2023-07-28 16:17:43 +08:00
|
|
|
import React, { useState } from 'react';
|
2023-05-12 14:43:48 +08:00
|
|
|
import { ColorPicker, theme } from 'antd';
|
2023-05-14 11:47:01 +08:00
|
|
|
import type { Color } from 'antd/es/color-picker';
|
2023-05-12 14:43:48 +08:00
|
|
|
|
|
|
|
const PureRenderColorPicker = ColorPicker._InternalPanelDoNotUseOrYouWillBeFired;
|
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const { token } = theme.useToken();
|
|
|
|
const [color, setColor] = useState<Color | string>(token.colorPrimary);
|
|
|
|
|
2023-05-16 14:18:12 +08:00
|
|
|
return (
|
|
|
|
<div style={{ paddingLeft: 100 }}>
|
|
|
|
<PureRenderColorPicker value={color} onChange={setColor} />
|
|
|
|
</div>
|
|
|
|
);
|
2023-05-12 14:43:48 +08:00
|
|
|
};
|