Skip to content

Commit

Permalink
Merge pull request software-mansion#804 from kimak/ts.mask
Browse files Browse the repository at this point in the history
Fix MaskProps type definitions
  • Loading branch information
msand authored Oct 12, 2018
2 parents deded89 + f45fa3e commit 99e98b6
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ export interface TransformProps extends TransformObject {
transform?: string | TransformObject,
}

export interface CommonPathProps extends FillProps, StrokeProps, ClipProps, TransformProps, ResponderProps, TouchableProps, DefinitionProps {}
export interface CommonMaskProps {
mask?: string;
}

export interface CommonPathProps extends FillProps, StrokeProps, ClipProps, TransformProps, ResponderProps, TouchableProps, DefinitionProps, CommonMaskProps {}

// Element props
export interface CircleProps extends CommonPathProps {
Expand Down Expand Up @@ -320,7 +323,31 @@ export const TextPath: React.ComponentClass<TextPathProps>;

export interface UseProps extends CommonPathProps {
href: string,
width: string,
height: string,
width?: string,
height?: string,
x?: NumberProp,
y?: NumberProp,
}
export const 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 {
id: string,
x?: NumberProp,
y?: NumberProp,
width?: NumberProp,
height?: NumberProp,
maskTransform?: string,
maskUnits?: TMaskUnits,
maskContentUnits?: TMaskUnits,
}
export const Mask: React.ComponentClass<MaskProps>;

0 comments on commit 99e98b6

Please sign in to comment.