mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 15:14:18 +00:00
Change enum declaration in index.d.ts to UnionType (#1800)
Co-authored-by: Avery Pierce <avery.pierce@spin.pm>
This commit is contained in:
Vendored
+4
-21
@@ -12,6 +12,8 @@ export type NumberArray = NumberProp[] | NumberProp;
|
|||||||
|
|
||||||
export type FillRule = 'evenodd' | 'nonzero';
|
export type FillRule = 'evenodd' | 'nonzero';
|
||||||
export type Units = 'userSpaceOnUse' | 'objectBoundingBox';
|
export type Units = 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
export type MarkerUnits = 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
export type Orient = 'auto' | 'auto-start-reverse';
|
||||||
|
|
||||||
export type TextAnchor = 'start' | 'middle' | 'end';
|
export type TextAnchor = 'start' | 'middle' | 'end';
|
||||||
export type FontStyle = 'normal' | 'italic' | 'oblique';
|
export type FontStyle = 'normal' | 'italic' | 'oblique';
|
||||||
@@ -464,15 +466,6 @@ export interface UseProps extends CommonPathProps {
|
|||||||
export const Use: React.ComponentClass<UseProps>;
|
export const Use: React.ComponentClass<UseProps>;
|
||||||
export type Use = React.ComponentClass<UseProps>;
|
export type Use = React.ComponentClass<UseProps>;
|
||||||
|
|
||||||
export enum EMaskUnits {
|
|
||||||
USER_SPACE_ON_USE = 'userSpaceOnUse',
|
|
||||||
OBJECT_BOUNDING_BOX = 'objectBoundingBox',
|
|
||||||
}
|
|
||||||
|
|
||||||
export type TMaskUnits =
|
|
||||||
| EMaskUnits.USER_SPACE_ON_USE
|
|
||||||
| EMaskUnits.OBJECT_BOUNDING_BOX;
|
|
||||||
|
|
||||||
export interface MaskProps extends CommonPathProps {
|
export interface MaskProps extends CommonPathProps {
|
||||||
id?: string;
|
id?: string;
|
||||||
x?: NumberProp;
|
x?: NumberProp;
|
||||||
@@ -480,22 +473,12 @@ export interface MaskProps extends CommonPathProps {
|
|||||||
width?: NumberProp;
|
width?: NumberProp;
|
||||||
height?: NumberProp;
|
height?: NumberProp;
|
||||||
maskTransform?: ColumnMajorTransformMatrix | string;
|
maskTransform?: ColumnMajorTransformMatrix | string;
|
||||||
maskUnits?: TMaskUnits;
|
maskUnits?: Units;
|
||||||
maskContentUnits?: TMaskUnits;
|
maskContentUnits?: Units;
|
||||||
}
|
}
|
||||||
export const Mask: React.ComponentClass<MaskProps>;
|
export const Mask: React.ComponentClass<MaskProps>;
|
||||||
export type Mask = React.ComponentClass<MaskProps>;
|
export type Mask = React.ComponentClass<MaskProps>;
|
||||||
|
|
||||||
export enum MarkerUnits {
|
|
||||||
STROKE_WIDTH = 'strokeWidth',
|
|
||||||
USER_SPACE_ON_USE = 'userSpaceOnUse',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum Orient {
|
|
||||||
AUTO = 'auto',
|
|
||||||
AUTO_START_REVERSE = 'auto-start-reverse',
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MarkerProps {
|
export interface MarkerProps {
|
||||||
id?: string;
|
id?: string;
|
||||||
viewBox?: string;
|
viewBox?: string;
|
||||||
|
|||||||
+6
-20
@@ -15,6 +15,8 @@ export type NumberProp = string | number;
|
|||||||
export type NumberArray = NumberProp[] | NumberProp;
|
export type NumberArray = NumberProp[] | NumberProp;
|
||||||
export type FillRule = "evenodd" | "nonzero";
|
export type FillRule = "evenodd" | "nonzero";
|
||||||
export type Units = "userSpaceOnUse" | "objectBoundingBox";
|
export type Units = "userSpaceOnUse" | "objectBoundingBox";
|
||||||
|
export type MarkerUnits = "strokeWidth" | "userSpaceOnUse";
|
||||||
|
export type Orient = "auto" | "auto-start-reverse";
|
||||||
export type TextAnchor = "start" | "middle" | "end";
|
export type TextAnchor = "start" | "middle" | "end";
|
||||||
export type FontStyle = "normal" | "italic" | "oblique";
|
export type FontStyle = "normal" | "italic" | "oblique";
|
||||||
export type FontVariant = "normal" | "small-caps";
|
export type FontVariant = "normal" | "small-caps";
|
||||||
@@ -429,13 +431,6 @@ export type UseProps = {
|
|||||||
} & CommonPathProps;
|
} & CommonPathProps;
|
||||||
declare export var Use: React.ComponentClass<UseProps>;
|
declare export var Use: React.ComponentClass<UseProps>;
|
||||||
export type UseType = React.ComponentClass<UseProps>;
|
export type UseType = React.ComponentClass<UseProps>;
|
||||||
declare export var EMaskUnits: {|
|
|
||||||
+USER_SPACE_ON_USE: "userSpaceOnUse", // "userSpaceOnUse"
|
|
||||||
+OBJECT_BOUNDING_BOX: "objectBoundingBox", // "objectBoundingBox"
|
|
||||||
|};
|
|
||||||
export type TMaskUnits =
|
|
||||||
| typeof EMaskUnits.USER_SPACE_ON_USE
|
|
||||||
| typeof EMaskUnits.OBJECT_BOUNDING_BOX;
|
|
||||||
export type MaskProps = {
|
export type MaskProps = {
|
||||||
id?: string,
|
id?: string,
|
||||||
x?: NumberProp,
|
x?: NumberProp,
|
||||||
@@ -443,21 +438,12 @@ export type MaskProps = {
|
|||||||
width?: NumberProp,
|
width?: NumberProp,
|
||||||
height?: NumberProp,
|
height?: NumberProp,
|
||||||
maskTransform?: ColumnMajorTransformMatrix | string,
|
maskTransform?: ColumnMajorTransformMatrix | string,
|
||||||
maskUnits?: TMaskUnits,
|
maskUnits?: Units,
|
||||||
maskContentUnits?: TMaskUnits,
|
maskContentUnits?: Units,
|
||||||
...
|
...
|
||||||
} & CommonPathProps;
|
} & CommonPathProps;
|
||||||
declare export var Mask: React.ComponentClass<MaskProps>;
|
declare export var Mask: React.ComponentClass<MaskProps>;
|
||||||
export type MaskType = React.ComponentClass<MaskProps>;
|
export type MaskType = React.ComponentClass<MaskProps>;
|
||||||
declare export var MarkerUnits: {|
|
|
||||||
+STROKE_WIDTH: "strokeWidth", // "strokeWidth"
|
|
||||||
+USER_SPACE_ON_USE: "userSpaceOnUse", // "userSpaceOnUse"
|
|
||||||
|};
|
|
||||||
|
|
||||||
declare export var Orient: {|
|
|
||||||
+AUTO: "auto", // "auto"
|
|
||||||
+AUTO_START_REVERSE: "auto-start-reverse", // "auto-start-reverse"
|
|
||||||
|};
|
|
||||||
export interface MarkerProps {
|
export interface MarkerProps {
|
||||||
id?: string;
|
id?: string;
|
||||||
viewBox?: string;
|
viewBox?: string;
|
||||||
@@ -466,8 +452,8 @@ export interface MarkerProps {
|
|||||||
refY?: NumberProp;
|
refY?: NumberProp;
|
||||||
markerWidth?: NumberProp;
|
markerWidth?: NumberProp;
|
||||||
markerHeight?: NumberProp;
|
markerHeight?: NumberProp;
|
||||||
markerUnits?: $Values<typeof MarkerUnits>;
|
markerUnits?: MarkerUnits;
|
||||||
orient?: $Values<typeof Orient> | NumberProp;
|
orient?: Orient | NumberProp;
|
||||||
}
|
}
|
||||||
declare export var Marker: React.ComponentClass<MarkerProps>;
|
declare export var Marker: React.ComponentClass<MarkerProps>;
|
||||||
export type MarkerType = React.ComponentClass<MarkerProps>;
|
export type MarkerType = React.ComponentClass<MarkerProps>;
|
||||||
|
|||||||
Reference in New Issue
Block a user