forked from github/plane
fix: color pick background color on change (#3691)
This commit is contained in:
parent
41e812a811
commit
eba5ed24ad
@ -66,7 +66,6 @@ export const CustomThemeSelector: React.FC = observer(() => {
|
|||||||
|
|
||||||
const handleValueChange = (val: string | undefined, onChange: any) => {
|
const handleValueChange = (val: string | undefined, onChange: any) => {
|
||||||
let hex = val;
|
let hex = val;
|
||||||
|
|
||||||
// prepend a hashtag if it doesn't exist
|
// prepend a hashtag if it doesn't exist
|
||||||
if (val && val[0] !== "#") hex = `#${val}`;
|
if (val && val[0] !== "#") hex = `#${val}`;
|
||||||
|
|
||||||
@ -94,7 +93,7 @@ export const CustomThemeSelector: React.FC = observer(() => {
|
|||||||
placeholder="#0d101b"
|
placeholder="#0d101b"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: value,
|
backgroundColor: watch("background"),
|
||||||
color: watch("text"),
|
color: watch("text"),
|
||||||
}}
|
}}
|
||||||
hasError={Boolean(errors?.background)}
|
hasError={Boolean(errors?.background)}
|
||||||
@ -120,8 +119,8 @@ export const CustomThemeSelector: React.FC = observer(() => {
|
|||||||
placeholder="#c5c5c5"
|
placeholder="#c5c5c5"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: watch("background"),
|
backgroundColor: watch("text"),
|
||||||
color: value,
|
color: watch("background"),
|
||||||
}}
|
}}
|
||||||
hasError={Boolean(errors?.text)}
|
hasError={Boolean(errors?.text)}
|
||||||
/>
|
/>
|
||||||
@ -146,7 +145,7 @@ export const CustomThemeSelector: React.FC = observer(() => {
|
|||||||
placeholder="#3f76ff"
|
placeholder="#3f76ff"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: value,
|
backgroundColor: watch("primary"),
|
||||||
color: watch("text"),
|
color: watch("text"),
|
||||||
}}
|
}}
|
||||||
hasError={Boolean(errors?.primary)}
|
hasError={Boolean(errors?.primary)}
|
||||||
@ -172,7 +171,7 @@ export const CustomThemeSelector: React.FC = observer(() => {
|
|||||||
placeholder="#0d101b"
|
placeholder="#0d101b"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: value,
|
backgroundColor: watch("sidebarBackground"),
|
||||||
color: watch("sidebarText"),
|
color: watch("sidebarText"),
|
||||||
}}
|
}}
|
||||||
hasError={Boolean(errors?.sidebarBackground)}
|
hasError={Boolean(errors?.sidebarBackground)}
|
||||||
@ -200,8 +199,8 @@ export const CustomThemeSelector: React.FC = observer(() => {
|
|||||||
placeholder="#c5c5c5"
|
placeholder="#c5c5c5"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: watch("sidebarBackground"),
|
backgroundColor: watch("sidebarText"),
|
||||||
color: value,
|
color: watch("sidebarBackground"),
|
||||||
}}
|
}}
|
||||||
hasError={Boolean(errors?.sidebarText)}
|
hasError={Boolean(errors?.sidebarText)}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user