Skip to content

Commit 66ef57f

Browse files
authored
feat: done #43 (#44)
1 parent 78e5165 commit 66ef57f

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.packito.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"name": "yarn test"
1111
},
1212
"output": "./dist",
13-
"copy": ["README.md", "LICENSE"]
13+
"copy": ["README.md", "LICENSE", "src/types/index.d.ts"]
1414
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.2.1",
44
"description": "Simple <ColorPicker /> components for React Material-Ui. No dependencies. It uses Hooks and support RGBA, HSVA, and more !",
55
"main": "index.js",
6+
"types": "index.d.ts",
67
"repository": "https://github.com/mikbry/material-ui-colorpicker.git",
78
"author": "Mik <[email protected]>",
89
"license": "MIT",
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
doPopup?: () => void;
5050
}
5151

52-
function ColorPicker<T extends Record<string, string> | null>(
52+
declare function ColorPicker<T extends Record<string, string> | null>(
5353
props: ColorPickerPalettenProps<T> | ColorPickerProps
5454
): JSX.Element;
5555

@@ -76,22 +76,23 @@
7676
tooltip?: string;
7777
}
7878

79-
function ColorButton(props: ColorButtonProps): JSX.Element;
79+
declare function ColorButton(props: ColorButtonProps): JSX.Element;
8080

8181
interface ColorInputProps {
8282
value?: Color | string | number;
8383
format?: string;
8484
onChange: (color: Color) => void;
8585
}
8686

87-
function ColorInput(props: ColorInputProps): JSX.Element;
87+
declare function ColorInput(props: ColorInputProps): JSX.Element;
8888

8989
interface ColorPaletteProps<T> {
9090
borderWidth?: number;
9191
palette: T;
9292
onSelect?: (color: keyof T) => void;
9393
}
94-
function ColorPalette<T extends Record<string, string>>(
94+
95+
declare function ColorPalette<T extends Record<string, string>>(
9596
props: ColorPaletteProps<T>
9697
): JSX.Element;
9798

@@ -102,7 +103,8 @@
102103
inputFormats?: string[];
103104
onChange: (color: Color) => void;
104105
}
105-
function ColorBox(props: ColorBoxProps): JSX.Element;
106+
107+
declare function ColorBox(props: ColorBoxProps): JSX.Element;
106108

107109
export {
108110
ColorPicker,

0 commit comments

Comments
 (0)