({ firstFieldRef, onCancel, onSave }: FormProps)
| 61 | } |
| 62 | |
| 63 | const Form = ({ firstFieldRef, onCancel, onSave }: FormProps) => { |
| 64 | const ref = firstFieldRef as MutableRefObject<HTMLInputElement> |
| 65 | return ( |
| 66 | <Stack spacing={4}> |
| 67 | <TextInput label="Column name" id="column-name" ref={firstFieldRef} defaultValue="New Column" /> |
| 68 | <ButtonGroup d="flex" justifyContent="flex-end"> |
| 69 | <Button variant="outline" onClick={onCancel}> |
| 70 | Cancel |
| 71 | </Button> |
| 72 | <Button colorScheme="teal" onClick={() => onSave(ref.current.value)}> |
| 73 | Add |
| 74 | </Button> |
| 75 | </ButtonGroup> |
| 76 | </Stack> |
| 77 | ) |
| 78 | } |
| 79 | |
| 80 | const AddColumnForm = ({ addColumn }: { addColumn: (newColumnName: string) => void }) => { |
| 81 | const { onOpen, onClose, isOpen } = useDisclosure() |
nothing calls this directly
no outgoing calls
no test coverage detected