DocSpace-client/packages/shared/components/color-picker
2024-03-21 18:09:55 +04:00
..
ColorPicker.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ColorPicker.styled.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ColorPicker.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ColorPicker.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Web: Shared: isPickerOnly option was added to ColorPicker 2024-01-23 14:48:45 +05:00

ColorPicker

Color picker dialog

Usage

import { ColorPicker } from "@docspace/shared/components/color-picker";
<ColorPicker
  appliedColor="#4781D1"
  onApply={(color) => console.log(color)}
  onClose={() => hideColorPicker()}
  applyButtonLabel="Apply"
  cancelButtonLabel="Cancel"
/>

Properties

Props Type Required Values Default Description
className string - - '' Allows to set classname
id string - - '' Allows to set id
appliedColor string - - '#4781D1' Selected color
onApply func - - - Triggers function on color apply
onClose func - - - Triggers function on color picker close
applyButtonLabel string - - - Apply button text
cancelButtonLabel string - - - Cancel button text
handleChange func - - - Allows handling the changing values of the component