react-color#CirclePicker TypeScript Examples

The following examples show how to use react-color#CirclePicker. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ColorPreview.tsx    From convoychat with GNU General Public License v3.0 5 votes vote down vote up
ColorPreview: React.FC<IColorPreview> = ({
  color,
  preview,
  handleColorChange,
}) => {
  return (
    <StyledColorPreview className="color-preview__grid">
      <Flex
        gap="xlarge"
        align="center"
        justify="space-between"
        nowrap
        style={{ flex: 1 }}
      >
        <Dropdown>
          <Dropdown.Toggle>
            <div
              className="color-picker__block"
              style={{ backgroundColor: color }}
            >
              <FaPalette />
            </div>
          </Dropdown.Toggle>
          <Dropdown.Content>
            <ChromePicker color={color} onChange={handleColorChange} />
          </Dropdown.Content>
        </Dropdown>
        <CirclePicker
          width={"150px"}
          circleSize={20}
          circleSpacing={10}
          color={color}
          colors={colors}
          onChange={handleColorChange}
        />
      </Flex>
      <div>{preview}</div>
    </StyledColorPreview>
  );
}