mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
## 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
41 lines
1010 B
TypeScript
41 lines
1010 B
TypeScript
import { UseFormReturn } from 'react-hook-form'
|
|
import {
|
|
FormControl,
|
|
FormField,
|
|
FormItem,
|
|
FormLabel,
|
|
FormMessage,
|
|
SheetSection,
|
|
TextArea_Shadcn_,
|
|
} from 'ui'
|
|
|
|
import { CreateCronJobForm } from './CreateCronJobSheet/CreateCronJobSheet.constants'
|
|
|
|
interface HttpBodyFieldSectionProps {
|
|
form: UseFormReturn<CreateCronJobForm>
|
|
}
|
|
|
|
export const HttpBodyFieldSection = ({ form }: HttpBodyFieldSectionProps) => {
|
|
return (
|
|
<SheetSection>
|
|
<FormField
|
|
control={form.control}
|
|
name="values.httpBody"
|
|
render={({ field }) => (
|
|
<FormItem className="gap-1 flex flex-col">
|
|
<FormLabel>HTTP Request Body</FormLabel>
|
|
<FormControl>
|
|
<TextArea_Shadcn_
|
|
className="h-72 rounded-none px-4 outline-none"
|
|
value={field.value}
|
|
onChange={field.onChange}
|
|
/>
|
|
</FormControl>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
</SheetSection>
|
|
)
|
|
}
|