ProjectNameInput.tsx28 lines · main
1import { UseFormReturn } from 'react-hook-form'
2import { FormControl, FormField, Input } from 'ui'
3import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
4
5import { CreateProjectForm } from './ProjectCreation.schema'
6import Panel from '@/components/ui/Panel'
7
8interface ProjectNameInputProps {
9 form: UseFormReturn<CreateProjectForm>
10}
11
12export const ProjectNameInput = ({ form }: ProjectNameInputProps) => {
13 return (
14 <Panel.Content>
15 <FormField
16 control={form.control}
17 name="projectName"
18 render={({ field }) => (
19 <FormItemLayout label="Project name" layout="horizontal">
20 <FormControl>
21 <Input {...field} placeholder="Project name" />
22 </FormControl>
23 </FormItemLayout>
24 )}
25 />
26 </Panel.Content>
27 )
28}