mirror of
https://github.com/supabase/supabase.git
synced 2026-06-13 10:09:12 +08:00
## Problem Now that we migrated old components to their new shadcn alternatives, we don't need the `_Shadcn_` suffix anymore. ## Solution Remove it <img width="659" height="609" alt="image" src="https://github.com/user-attachments/assets/2d7271a9-066a-4dcc-92fe-729b106d2c2f" />
41 lines
996 B
TypeScript
41 lines
996 B
TypeScript
import { UseFormReturn } from 'react-hook-form'
|
|
import {
|
|
FormControl,
|
|
FormField,
|
|
FormItem,
|
|
FormLabel,
|
|
FormMessage,
|
|
SheetSection,
|
|
TextArea,
|
|
} 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
|
|
className="h-72 rounded-none px-4 outline-hidden"
|
|
value={field.value}
|
|
onChange={field.onChange}
|
|
/>
|
|
</FormControl>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
</SheetSection>
|
|
)
|
|
}
|