This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy types from DefinitelyTyped into index.d.ts (#43)
- Loading branch information
1 parent
98bf2e4
commit 9da53ee
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
declare module '@react-native-community/art' { | ||
import {ViewStyle, StyleProp} from 'react-native'; | ||
import React from 'react'; | ||
|
||
export interface ARTNodeMixin { | ||
opacity?: number; | ||
originX?: number; | ||
originY?: number; | ||
scaleX?: number; | ||
scaleY?: number; | ||
scale?: number; | ||
title?: string; | ||
x?: number; | ||
y?: number; | ||
visible?: boolean; | ||
} | ||
|
||
export interface ARTGroupProps extends ARTNodeMixin { | ||
width?: number; | ||
height?: number; | ||
} | ||
|
||
export interface ARTClippingRectangleProps extends ARTNodeMixin { | ||
width?: number; | ||
height?: number; | ||
} | ||
|
||
export interface ARTRenderableMixin extends ARTNodeMixin { | ||
fill?: string; | ||
stroke?: string; | ||
strokeCap?: 'butt' | 'square' | 'round'; | ||
strokeDash?: number[]; | ||
strokeJoin?: 'bevel' | 'miter' | 'round'; | ||
strokeWidth?: number; | ||
} | ||
|
||
export interface ARTShapeProps extends ARTRenderableMixin { | ||
d: string; | ||
width?: number; | ||
height?: number; | ||
} | ||
|
||
export interface ARTTextProps extends ARTRenderableMixin { | ||
font?: string; | ||
alignment?: string; | ||
} | ||
|
||
export interface ARTSurfaceProps { | ||
style?: StyleProp<ViewStyle>; | ||
width: number; | ||
height: number; | ||
} | ||
|
||
export class ClippingRectangle extends React.Component<ARTClippingRectangleProps> {} | ||
|
||
export class Group extends React.Component<ARTGroupProps> {} | ||
|
||
export class Shape extends React.Component<ARTShapeProps> {} | ||
|
||
export class Surface extends React.Component<ARTSurfaceProps> {} | ||
|
||
export class Text extends React.Component<ARTTextProps> {} | ||
} |