import React, { useState } from 'react'; import { App, ColorPicker } from 'antd'; import type { ColorPickerProps } from 'antd/es/color-picker'; const Demo = () => { const { message } = App.useApp(); const [value, setValue] = useState('#1677ff'); return ( { setValue(color); message.success(`The selected color is ${color.toHexString()}`); }} /> ); }; export default Demo;