forked from realvjy/coolshapes-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
53 lines (49 loc) · 1.97 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import React, { ForwardRefExoticComponent, RefAttributes, SVGProps } from 'react';
type svgProps = RefAttributes<SVGSVGElement> & Partial<SVGProps<SVGSVGElement>>;
interface ShapeProps extends svgProps {
size?: number;
noise?: boolean;
styles?: {
[key: string]: string;
};
}
type ShapeType = ForwardRefExoticComponent<ShapeProps>;
declare const shapes: {
star: ShapeType[];
flower: ShapeType[];
ellipse: ShapeType[];
wheel: ShapeType[];
moon: ShapeType[];
misc: ShapeType[];
triangle: ShapeType[];
polygon: ShapeType[];
rectangle: ShapeType[];
number: ShapeType[];
};
type shapeTypes = keyof typeof shapes;
type componentId = {
shapeType: shapeTypes;
index: number;
};
declare const getRandomShape: ({ type, onlyId, }?: {
type?: "number" | "ellipse" | "polygon" | "star" | "flower" | "wheel" | "moon" | "misc" | "triangle" | "rectangle" | undefined;
onlyId?: boolean | undefined;
}) => ShapeType | componentId;
interface ShapeOptions extends BaseShapeOptions {
type?: shapeTypes;
}
interface BaseShapeOptions extends ShapeProps {
index?: number;
random?: boolean;
}
declare const Coolshape: ForwardRefExoticComponent<ShapeOptions>;
declare const Star: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Ellipse: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Flower: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Misc: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Moon: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Triangle: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Rectangle: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Polygon: React.ForwardRefExoticComponent<BaseShapeOptions>;
declare const Number: React.ForwardRefExoticComponent<BaseShapeOptions>;
export { Coolshape, Ellipse, Flower, Misc, Moon, Number, Polygon, Rectangle, Star, Triangle, getRandomShape, type shapeTypes, shapes };