mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 01:11:26 +08:00
2cdf586291
* chore: fix lint * chore: fix lint * test: fix 16 * fix: lint
17 lines
490 B
TypeScript
17 lines
490 B
TypeScript
import React, { useState } from 'react';
|
|
import { ColorPicker, theme } from 'antd';
|
|
import type { Color } from 'antd/es/color-picker';
|
|
|
|
const PureRenderColorPicker = ColorPicker._InternalPanelDoNotUseOrYouWillBeFired;
|
|
|
|
export default () => {
|
|
const { token } = theme.useToken();
|
|
const [color, setColor] = useState<Color | string>(token.colorPrimary);
|
|
|
|
return (
|
|
<div style={{ paddingLeft: 100 }}>
|
|
<PureRenderColorPicker value={color} onChange={setColor} />
|
|
</div>
|
|
);
|
|
};
|