fix: 修改 demo

This commit is contained in:
linxianxi 2023-05-26 16:23:21 +08:00
parent a6617c9763
commit 434ef1fd7c
2 changed files with 4 additions and 16 deletions

View File

@ -1,7 +1,7 @@
## zh-CN
清除已选择的颜色。可以使用受控 open 和 onClear 控制清除时关闭弹窗。
清除已选择的颜色。
## en-US
Clear Color. You can use the controlled open and onClear controls to close popovers when clearing.
Clear Color.

View File

@ -1,16 +1,4 @@
import { ColorPicker } from 'antd';
import React, { useState } from 'react';
import React from 'react';
export default () => {
const [open, setOpen] = useState(false);
return (
<ColorPicker
open={open}
allowClear
onOpenChange={setOpen}
onClear={() => {
setOpen(false);
}}
/>
);
};
export default () => <ColorPicker allowClear />;