mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 18:00:20 -04:00
0facd341a6
## Problem We used to have a `_Shadcn_` suffix for all the shadcn form components because we also had `formik` form components. This is not needed anymore. ## Solution - Remove the suffix - Update all usages
27 lines
909 B
TypeScript
27 lines
909 B
TypeScript
import { UseFormReturn } from 'react-hook-form'
|
|
import { FormControl, FormField, Input_Shadcn_, SheetSection } from 'ui'
|
|
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
|
|
|
|
import { CreateQueueForm } from './CreateQueueSheet.schema'
|
|
|
|
export function QueueNameField({ form }: { form: UseFormReturn<CreateQueueForm> }) {
|
|
return (
|
|
<SheetSection>
|
|
<FormField
|
|
control={form.control}
|
|
name="name"
|
|
render={({ field }) => (
|
|
<FormItemLayout label="Name" layout="vertical" className="gap-1 relative">
|
|
<FormControl>
|
|
<Input_Shadcn_ {...field} />
|
|
</FormControl>
|
|
<span className="text-foreground-lighter text-xs absolute top-0 right-0">
|
|
Can include letters, numbers, underscores, and hyphens
|
|
</span>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
</SheetSection>
|
|
)
|
|
}
|