sccoreui 4.6.4 → 4.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_color_1 = require("react-color");
|
|
6
|
-
const CustomColorPicker = ({ onChange, defaultValue,
|
|
6
|
+
const CustomColorPicker = ({ onChange, defaultValue, className }) => {
|
|
7
7
|
const [color, setColor] = (0, react_1.useState)(defaultValue);
|
|
8
8
|
const handleColorChange = (newColor) => {
|
|
9
9
|
setColor(newColor.hex);
|
|
10
10
|
onChange(newColor);
|
|
11
11
|
};
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_color_1.ChromePicker, { className:
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_color_1.ChromePicker, { className: className, color: color, onChange: handleColorChange }) }));
|
|
13
13
|
};
|
|
14
14
|
exports.default = CustomColorPicker;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CustomColorPickerTypes } from '../types/type';
|
|
2
|
-
declare const CustomColorPicker: ({ onChange, defaultValue,
|
|
2
|
+
declare const CustomColorPicker: ({ onChange, defaultValue, className }: CustomColorPickerTypes) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CustomColorPicker;
|
|
@@ -158,7 +158,7 @@ export interface TreeDropdownSelectTypes {
|
|
|
158
158
|
export interface CustomColorPickerTypes {
|
|
159
159
|
onChange?: any;
|
|
160
160
|
defaultValue: string;
|
|
161
|
-
|
|
161
|
+
className?: string;
|
|
162
162
|
}
|
|
163
163
|
export interface FroalaTextEditorTypes {
|
|
164
164
|
onChange?: any;
|