From 61238a708185f4f53853a8e99a2d7d7e4fd0d489 Mon Sep 17 00:00:00 2001 From: Ivan Evans <74743263+Pasithea0@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:41:23 -0600 Subject: [PATCH] prettier color picker --- .../atoms/settings/CaptionSettingsView.tsx | 24 ++++++++------ src/pages/parts/settings/CaptionsPart.tsx | 32 +++++++++++-------- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/components/player/atoms/settings/CaptionSettingsView.tsx b/src/components/player/atoms/settings/CaptionSettingsView.tsx index 5bbbb433..67589d98 100644 --- a/src/components/player/atoms/settings/CaptionSettingsView.tsx +++ b/src/components/player/atoms/settings/CaptionSettingsView.tsx @@ -328,15 +328,21 @@ export function CaptionSettingsView({ /> ))} {/* Add Color Picker */} - { - const color = e.target.value; - handleStylingChange({ ...styling, color }); - }} - className="w-10 h-10 border rounded-md cursor-pointer" - /> +
+ { + const color = e.target.value; + handleStylingChange({ ...styling, color }); + }} + className="absolute opacity-0 cursor-pointer w-10 h-10" + /> +
+
diff --git a/src/pages/parts/settings/CaptionsPart.tsx b/src/pages/parts/settings/CaptionsPart.tsx index 22bdcf4e..77758ed8 100644 --- a/src/pages/parts/settings/CaptionsPart.tsx +++ b/src/pages/parts/settings/CaptionsPart.tsx @@ -168,19 +168,25 @@ export function CaptionsPart(props: { /> ))} {/* Add Color Picker */} - { - const color = e.target.value; - handleStylingChange({ ...props.styling, color }); - subtitleStore.updateStyling({ - ...props.styling, - color, - }); - }} - className="w-10 h-10 border rounded-md cursor-pointer" - /> +
+ { + const color = e.target.value; + handleStylingChange({ ...props.styling, color }); + subtitleStore.updateStyling({ + ...props.styling, + color, + }); + }} + className="absolute opacity-0 cursor-pointer w-8 h-8" + /> +
+