/*
 * @Note:
 * @Author: 2058827620@qq.com
 * @Date: 2022-04-03 10:53:25
 */
import { useState } from 'react';
import { ColorPicker, theme, Drawer, Button } from 'antd';

export default (props) => {
  const { token } = theme.useToken();
  const [color, setColor] = useState(token.colorPrimary);
  const [open, setOpen] = useState(false);

  const onClose = () => {
    setOpen(false)
  }
  return (
    <>
      {/* <Button
        onClick={() => {
          setOpen(true)
        }}
      >
        主题
      </Button>
      <Drawer
        title={`主题`}
        placement="right"
        size="400px"
        onClose={onClose}
        open={open}
      >
        
      </Drawer> */}
      <ColorPicker
        value={color}
        onChange={setColor}
        presets={[
          {
            label: '',
            colors: [
              '#F5222D',
              '#FA8C16',
              '#FADB14',
              '#8BBB11',
              '#52C41A',
              '#13A8A8',
              '#1677FF',
              '#2F54EB',
              '#722ED1',
              '#EB2F96',
            ],
          },

        ]}
      />
    </>
  );
};

