From a7c5da8d9c256e91a0ae2ec5fdbd3976bec664ef Mon Sep 17 00:00:00 2001 From: Ardeman Date: Thu, 6 Mar 2025 08:45:24 +0800 Subject: [PATCH] style: update button and switch components for improved UI consistency --- app/components/text-editor/editor-button.tsx | 4 +-- app/components/ui/switch.tsx | 2 +- app/pages/dashboard-contents/index.tsx | 35 ++------------------ 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/app/components/text-editor/editor-button.tsx b/app/components/text-editor/editor-button.tsx index 4712e8d..ba239a9 100644 --- a/app/components/text-editor/editor-button.tsx +++ b/app/components/text-editor/editor-button.tsx @@ -21,8 +21,8 @@ export const EditorButton = (properties: TProperties) => { onClick={onClick} disabled={disabled} className={twMerge( - 'flex h-6 w-8 items-center justify-center rounded-md text-xl hover:!bg-[#FCB017] disabled:cursor-not-allowed disabled:text-slate-400 disabled:opacity-50', - isActive ? 'bg-[#FCB01755]' : '', + 'flex h-6 w-8 items-center justify-center rounded-md p-2 hover:bg-[#2E2F7C] hover:text-white disabled:cursor-not-allowed disabled:bg-[#2E2F7C]/50 disabled:text-white disabled:hover:bg-[#2E2F7C]/50', + isActive ? 'bg-[#2E2F7C]/10' : '', className, )} style={style} diff --git a/app/components/ui/switch.tsx b/app/components/ui/switch.tsx index a6a6ffc..c79df4c 100644 --- a/app/components/ui/switch.tsx +++ b/app/components/ui/switch.tsx @@ -63,7 +63,7 @@ export const Switch = >( field.onChange(checked) }} className={twMerge( - 'group relative flex h-7 w-14 cursor-pointer rounded-full bg-black/10 p-1 shadow transition-colors duration-200 ease-in-out focus:outline-none data-[checked]:bg-black/10 data-[focus]:outline-1 data-[focus]:outline-white', + 'group relative flex h-7 w-14 cursor-pointer rounded-full bg-[#2E2F7C]/10 p-1 shadow transition-colors duration-200 ease-in-out focus:outline-none data-[checked]:bg-[#2E2F7C]/90 data-[focus]:outline-1 data-[focus]:outline-white', className, )} > diff --git a/app/pages/dashboard-contents/index.tsx b/app/pages/dashboard-contents/index.tsx index 7ba58fe..c6238d7 100644 --- a/app/pages/dashboard-contents/index.tsx +++ b/app/pages/dashboard-contents/index.tsx @@ -1,9 +1,7 @@ -import { Field, Input, Label, Select } from '@headlessui/react' import DT from 'datatables.net-dt' import DataTable from 'datatables.net-react' import { Link } from 'react-router' -import { SearchIcon } from '~/components/icons/search' import { Button } from '~/components/ui/button' import { UiTable } from '~/components/ui/table' import { TitleDashboard } from '~/components/ui/title-dashboard' @@ -57,37 +55,8 @@ export const ContentsPage = () => { return (
-
-
-
- - -
- -
- -
-
-
-
- -
- - - - -
-
+
+
{/* TODO: Filter */}