mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
11 lines
336 B
TypeScript
11 lines
336 B
TypeScript
|
import { ColorPicker, theme } from 'antd';
|
||
|
import type { Color } from 'antd/lib/color-picker';
|
||
|
import React, { useState } from 'react';
|
||
|
|
||
|
export default () => {
|
||
|
const { token } = theme.useToken();
|
||
|
const [color, setColor] = useState<Color | string>(token.colorPrimary);
|
||
|
|
||
|
return <ColorPicker value={color} onChange={setColor} />;
|
||
|
};
|