Skip to content

Commit 9d62a41

Browse files
author
k.golikov
committed
Fix alpha in BgGeneratorPage
1 parent be36e34 commit 9d62a41

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pages/bgGeneratorPage/BgGeneratorPage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ const BgGeneratorPage = () => {
4848
50
4949
);
5050

51-
const handleColorChange = useCallback<ColorChangeHandler>(({ hex }) => {
52-
setColor(hex);
51+
const handleColorChange = useCallback<ColorChangeHandler>(({ rgb }) => {
52+
const { r, g, b, a } = rgb;
53+
setColor(`rgba(${r}, ${g}, ${b}, ${a})`);
5354
}, []);
5455

5556
const handleSizeChange = useCallback(

0 commit comments

Comments
 (0)