mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 01:00:43 +00:00
Add class names
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { requireNativeComponent } from "react-native";
|
||||
import extractProps from "../lib/extract/extractProps";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Circle extends Shape {
|
||||
static displayName = "Circle";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from "react";
|
||||
import { requireNativeComponent } from "react-native";
|
||||
import extractClipPath from "../lib/extract/extractClipPath";
|
||||
|
||||
export default class extends Component {
|
||||
export default class ClipPath extends Component {
|
||||
static displayName = "ClipPath";
|
||||
|
||||
setNativeProps = (...args) => {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from "react";
|
||||
import { requireNativeComponent } from "react-native";
|
||||
|
||||
export default class extends Component {
|
||||
export default class Defs extends Component {
|
||||
static displayName = "Defs";
|
||||
|
||||
render() {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { requireNativeComponent } from "react-native";
|
||||
import extractProps from "../lib/extract/extractProps";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Ellipse extends Shape {
|
||||
static displayName = "Ellipse";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { extractFont } from "../lib/extract/extractText";
|
||||
import extractTransform from "../lib/extract/extractTransform";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class G extends Shape {
|
||||
static displayName = "G";
|
||||
|
||||
setNativeProps = props => {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import Shape from "./Shape";
|
||||
|
||||
const spacesRegExp = /\s+/;
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Image extends Shape {
|
||||
static displayName = "Image";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { requireNativeComponent } from "react-native";
|
||||
import extractProps from "../lib/extract/extractProps";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Line extends Shape {
|
||||
static displayName = "Line";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from "react";
|
||||
import { requireNativeComponent } from "react-native";
|
||||
import extractGradient from "../lib/extract/extractGradient";
|
||||
|
||||
export default class extends Component {
|
||||
export default class LinearGradient extends Component {
|
||||
static displayName = "LinearGradient";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { requireNativeComponent } from "react-native";
|
||||
import extractTransform from "../lib/extract/extractTransform";
|
||||
import units from "../lib/units";
|
||||
|
||||
export default class extends Component {
|
||||
export default class Mask extends Component {
|
||||
static displayName = "Mask";
|
||||
|
||||
setNativeProps = props => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { requireNativeComponent } from "react-native";
|
||||
import extractProps from "../lib/extract/extractProps";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Path extends Shape {
|
||||
static displayName = "Path";
|
||||
|
||||
setNativeProps = (...args) => {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import extractTransform from "../lib/extract/extractTransform";
|
||||
import extractViewBox from "../lib/extract/extractViewBox";
|
||||
import units from "../lib/units";
|
||||
|
||||
export default class extends Component {
|
||||
export default class Pattern extends Component {
|
||||
static displayName = "Pattern";
|
||||
|
||||
setNativeProps = props => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import Path from "./Path";
|
||||
import Shape from "./Shape";
|
||||
import extractPolyPoints from "../lib/extract/extractPolyPoints";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Polygon extends Shape {
|
||||
static displayName = "Polygon";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import Path from "./Path";
|
||||
import Shape from "./Shape";
|
||||
import extractPolyPoints from "../lib/extract/extractPolyPoints";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Polyline extends Shape {
|
||||
static displayName = "Polyline";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from "react";
|
||||
import { requireNativeComponent } from "react-native";
|
||||
import extractGradient from "../lib/extract/extractGradient";
|
||||
|
||||
export default class extends Component {
|
||||
export default class RadialGradient extends Component {
|
||||
static displayName = "RadialGradient";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { requireNativeComponent } from "react-native";
|
||||
import extractProps from "../lib/extract/extractProps";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Rect extends Shape {
|
||||
static displayName = "Rect";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
+1
-3
@@ -3,7 +3,7 @@ import SvgTouchableMixin from "../lib/SvgTouchableMixin";
|
||||
|
||||
const touch = Object.entries(SvgTouchableMixin);
|
||||
|
||||
class Shape extends Component {
|
||||
export default class Shape extends Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
for (const [key, val] of touch) {
|
||||
@@ -16,5 +16,3 @@ class Shape extends Component {
|
||||
this.state = this.touchableGetInitialState();
|
||||
}
|
||||
}
|
||||
|
||||
export default Shape;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { Component } from "react";
|
||||
|
||||
export default class extends Component {
|
||||
export default class Stop extends Component {
|
||||
static displayName = "Stop";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
+1
-3
@@ -19,7 +19,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
class Svg extends Shape {
|
||||
export default class Svg extends Shape {
|
||||
static displayName = "Svg";
|
||||
|
||||
static defaultProps = {
|
||||
@@ -141,5 +141,3 @@ class Svg extends Shape {
|
||||
}
|
||||
|
||||
const NativeSvgView = requireNativeComponent("RNSVGSvgView");
|
||||
|
||||
export default Svg;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import React, { Component } from "react";
|
||||
import { requireNativeComponent } from "react-native";
|
||||
import extractViewBox from "../lib/extract/extractViewBox";
|
||||
|
||||
export default class extends Component {
|
||||
export default class Symbol extends Component {
|
||||
static displayName = "Symbol";
|
||||
|
||||
render() {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { pickNotNil } from "../lib/util";
|
||||
import Shape from "./Shape";
|
||||
import "./TSpan";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Text extends Shape {
|
||||
static displayName = "Text";
|
||||
|
||||
setNativeProps = props => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { idPattern, pickNotNil } from "../lib/util";
|
||||
import Shape from "./Shape";
|
||||
import TSpan from "./TSpan";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class TextPath extends Shape {
|
||||
static displayName = "TextPath";
|
||||
|
||||
setNativeProps = props => {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import extractProps from "../lib/extract/extractProps";
|
||||
import { idPattern } from "../lib/util";
|
||||
import Shape from "./Shape";
|
||||
|
||||
export default class extends Shape {
|
||||
export default class Use extends Shape {
|
||||
static displayName = "Use";
|
||||
|
||||
static defaultProps = {
|
||||
|
||||
Reference in New Issue
Block a user