@hbtv/color-picker
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.5 • Public • Published

    @hbtv/color-picker

    安装方法

    yarn add @hbtv/color-picker

    使用方法

    import React,{ useState } from 'react'; 
    import ColorPicker from './index';
     
    const Usage = () => {
      const [color, setColor] = useState('transparent');
      return (
        <div>
         选择颜色:<ColorPicker value={color} onChange={setColor} />
        </div>
      );
    }
     
    export default Usage;
    export interface ColorPickerProps {
      output?: 'hex' | 'rgba'; // 输出颜色 模式 #fff 或 rgba(107,48,48,0.6)
      mode?: 'simple' | 'complex'; // 调色板颜色
      placement?: 'left' | 'right' | 'top' | 'bottom'; // 提示框位置 默认bottom
      style?: CSSProperties; // 样式
      showInput?: boolean; // 显示输入框 默认 true
      value?: string; // 颜色值
      onChange?: (value: string) => void; // onChange 事件
    }

    Keywords

    none

    Install

    npm i @hbtv/color-picker

    DownloadsWeekly Downloads

    6

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    11.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • gegang
    • zix2002
    • yugong
    • dokey
    • gogoing
    • xuezhidp
    • aa719032411