0.0.31 • Published 3 years ago

@uiw/react-color-chorme v0.0.31

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

React Color Github

npm bundle size npm version Open in unpkg

Install

npm i @uiw/react-color-chorme

Usage

import Chorme from '@uiw/react-color-chorme';
import { GithubPlacement } from '@uiw/react-color-github';

function Demo() {
  const [hex, setHex] = useState("#fff");
  return (
    <Chorme
      color={hex}
      placement={GithubPlacement.Right}
      onChange={(color) => {
        setHex(color.hex);
      }}
    />
  );
}

Props

import { GithubProps } from '@uiw/react-color-github';

export enum ChromeInputType {
  HEXA = 'hexa',
  RGBA = 'rgba',
  HSLA = 'hsla',
}

export interface ChromeProps extends Omit<GithubProps, 'colors'> {
  inputType?: ChromeInputType;
}

License

Licensed under the MIT License.