mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 10:31:46 +00:00
Make color picker and paint menu use hex alpha picker (#426)
This commit is contained in:
1 parent
0d41a52d5e
commit
ecee0d2ea8
2 files changed
+7
-7
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import { ChangeEvent, useState, useEffect } from "react";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
import {
|
||||
faFont,
|
||||
faHashtag,
|
||||
@@ -7,11 +5,13 @@ import {
|
||||
} from "@fortawesome/pro-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
|
||||
import { HexColorPicker } from "react-colorful";
|
||||
import { ChangeEvent, useEffect, useState } from "react";
|
||||
import { HexAlphaColorPicker } from "react-colorful";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
import { paperWrapperStyles } from "~/components/styles";
|
||||
import { Button } from "../Button";
|
||||
import { Input } from "../Input";
|
||||
import { paperWrapperStyles } from "~/components/styles";
|
||||
|
||||
export const ColorPicker = ({
|
||||
color: prevColor,
|
||||
@@ -119,7 +119,7 @@ export const ColorPicker = ({
|
||||
}
|
||||
static
|
||||
>
|
||||
<HexColorPicker
|
||||
<HexAlphaColorPicker
|
||||
className="overflow-hidden"
|
||||
color={currColor}
|
||||
onChange={(color) => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
|
||||
import { ChangeEvent, useEffect, useState } from "react";
|
||||
import { HexColorPicker } from "react-colorful";
|
||||
import { HexAlphaColorPicker } from "react-colorful";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
import { useSignals } from "@preact/signals-react/runtime";
|
||||
@@ -126,7 +126,7 @@ export const PaintModeMenu = ({
|
||||
}
|
||||
static
|
||||
>
|
||||
<HexColorPicker
|
||||
<HexAlphaColorPicker
|
||||
className="overflow-hidden"
|
||||
color={currColor}
|
||||
onChange={(color) => {
|
||||
|
||||
Reference in new issue
Block a user