Merge remote-tracking branch 'origin/master' into feature/slicing

This commit is contained in:
fredy.siswanto
2025-03-09 23:25:01 +07:00
8 changed files with 115 additions and 18 deletions
+7 -2
View File
@@ -11,6 +11,8 @@ import {
import { useRemixFormContext } from 'remix-hook-form'
import { twMerge } from 'tailwind-merge'
import { useAdminContext } from '~/contexts/admin'
import { Button } from './button'
type TInputProperties<T extends FieldValues> = Omit<
@@ -40,6 +42,7 @@ export const InputFile = <TFormValues extends Record<string, unknown>>(
labelClassName,
...restProperties
} = properties
const { setIsUploadOpen } = useAdminContext()
const {
register,
@@ -59,7 +62,7 @@ export const InputFile = <TFormValues extends Record<string, unknown>>(
</Label>
<HeadlessInput
className={twMerge(
'h-[42px] w-full rounded-md border border-[#DFDFDF] p-2',
'h-[42px] w-full rounded-md border border-[#DFDFDF] p-2 pr-8',
className,
)}
placeholder={placeholder}
@@ -71,7 +74,9 @@ export const InputFile = <TFormValues extends Record<string, unknown>>(
variant="icon"
size="fit"
className="absolute right-3 h-[42px]"
onClick={() => {}}
onClick={() => {
setIsUploadOpen('featured_image')
}}
>
<CloudArrowUpIcon className="h-4 w-4 text-gray-500/50" />
</Button>
+1 -1
View File
@@ -63,7 +63,7 @@ export const Input = <TFormValues extends Record<string, unknown>>(
<HeadlessInput
type={inputType}
className={twMerge(
'h-[42px] w-full rounded-md border border-[#DFDFDF] p-2',
'h-[42px] w-full rounded-md border border-[#DFDFDF] p-2 pr-8',
className,
)}
placeholder={inputType === 'password' ? '******' : placeholder}