1.0.0 • Published 3 years ago

@hbtv/color-piker v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@hbtv/color-picker

安装方法

yarn add @hbtv/color-picker

ChangeLog

1.0.0

使用方法

import React,{ useState } from 'react'; 
import ColorPicker from './index';

const Usage = () => {
  const [color, setColor] = useState('transparent');
  return (
    <div>
     选择颜色:<ColorPicker color={color} onChange={setColor} />
    </div>
  );
}

export default Usage;
export interface ColorPickerProps {
  mode?: 'simple' | 'complex'; // 调色板颜色
  style?: CSSProperties; // 样式
  value?: string; // 颜色值
  onChange?: (value: string) => void; // onChange 事件
}
1.0.0

3 years ago