chore(deps): bump react-colorful from 5.6.1 to 5.7.0 (#12386)

* chore(deps): bump react-colorful from 5.6.1 to 5.7.0

Bumps [react-colorful](https://github.com/omgovich/react-colorful) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/omgovich/react-colorful/releases)
- [Changelog](https://github.com/omgovich/react-colorful/blob/master/CHANGELOG.md)
- [Commits](https://github.com/omgovich/react-colorful/commits/5.7.0)

---
updated-dependencies:
- dependency-name: react-colorful
  dependency-version: 5.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use new prop

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
dependabot[bot]
2026-05-18 22:57:52 -04:00
committed by GitHub
parent 6e2b53315b
commit 620c654b26
3 changed files with 11 additions and 27 deletions
+5 -21
View File
@@ -1,7 +1,6 @@
import copy from "copy-to-clipboard";
import { debounce } from "es-toolkit/compat";
import { CheckmarkIcon, CopyIcon } from "outline-icons";
import { useMemo, useState, useEffect, useRef, useCallback } from "react";
import { useState, useRef, useCallback } from "react";
import {
HexColorInput,
HexAlphaColorPicker,
@@ -41,23 +40,6 @@ function ColorPicker({ activeColor, onSelect, alpha }: Props) {
[onSelect]
);
const debouncedApplyColor = useMemo(
() => debounce(applyColor, 250),
[applyColor]
);
useEffect(
() => () => {
debouncedApplyColor.cancel();
},
[debouncedApplyColor]
);
const handleColorChangePicker = (newColor: string) => {
setColor(newColor);
debouncedApplyColor(newColor);
};
const handleColorChangeInput = (newColor: string) => {
setColor(newColor);
applyColor(newColor);
@@ -75,12 +57,14 @@ function ColorPicker({ activeColor, onSelect, alpha }: Props) {
{alpha ? (
<StyledHexAlphaColorPicker
color={color}
onChange={handleColorChangePicker}
onChange={setColor}
onChangeEnd={applyColor}
/>
) : (
<StyledHexNonAlphaColorPicker
color={color}
onChange={handleColorChangePicker}
onChange={setColor}
onChangeEnd={applyColor}
/>
)}