diff --git a/app/components/ui/switch.tsx b/app/components/ui/switch.tsx index da7aaaa..a9afd89 100644 --- a/app/components/ui/switch.tsx +++ b/app/components/ui/switch.tsx @@ -20,6 +20,10 @@ type TSwitchProperties = { labelClassName?: string className?: string inputClassName?: string + options?: { + true: string + false: string + } } export const Switch = >( @@ -34,6 +38,7 @@ export const Switch = >( labelClassName, className, inputClassName, + options, } = properties const { @@ -63,13 +68,22 @@ export const Switch = >( field.onChange(checked) }} className={twMerge( - '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', + 'group flex h-7 cursor-pointer items-center 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', inputClassName, )} > - + {field.value ? options?.true : options?.false} + + diff --git a/app/pages/contents-create/index.tsx b/app/pages/contents-create/index.tsx index 5cfee5f..a14ff31 100644 --- a/app/pages/contents-create/index.tsx +++ b/app/pages/contents-create/index.tsx @@ -180,9 +180,10 @@ export const CreateContentsPage = () => { diff --git a/app/pages/dashboard-contents/index.tsx b/app/pages/dashboard-contents/index.tsx index d01a442..15f5c77 100644 --- a/app/pages/dashboard-contents/index.tsx +++ b/app/pages/dashboard-contents/index.tsx @@ -45,7 +45,7 @@ export const ContentsPage = () => { }, { title: 'Tag', data: 'tags' }, { - title: 'Premium', + title: 'Subscription', data: 'is_premium', }, {