@hawk-ui/color-picker
v4.4.4
Published
hawk-ui: Basic Color Picker Component
Downloads
368
Maintainers
Readme
Installation
To install a component run
$ npm install @hawk-ui/color-picker --save
Please import CSS styles via
@import '/path__to__node_modules/@hawk-ui/color-picker/dist/index.min.css
Usage
With Hex Code
import ColorPicker from '@hawk-ui/color-picker';
<ColorPicker
defaultColor="#f18ca6"
onSave={(event) => { console.log('query onSave', event); }}
/>
With Background
import ColorPicker from '@hawk-ui/color-picker';
<ColorPicker
defaultColor="f18ca6"
showHexCode={false}
onSave={(event) => { console.log('query onSave', event); }}
/>
With Text
import ColorPicker from '@hawk-ui/color-picker';
<ColorPicker
defaultColor="f18ca6"
showHexCode={false}
isText
title="A"
onSave={(event) => { console.log('query onSave', event); }}
/>
With Icon
import ColorPicker from '@hawk-ui/color-picker';
<ColorPicker
defaultColor="f18ca6"
showHexCode={false}
isIcon
title="fas fa-paint-roller"
onSave={(event) => { console.log('query onSave', event); }}
/>