Skip to content

Commit 8d5bac6

Browse files
authored
Update usage.mdx with correct imports (#236)
1 parent df5d37f commit 8d5bac6

File tree

1 file changed

+9
-3
lines changed
  • apps/website/src/pages/docs/components/forms/file-upload

1 file changed

+9
-3
lines changed

apps/website/src/pages/docs/components/forms/file-upload/usage.mdx

+9-3
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,19 @@ FileUpload can be used in a `Form` by creating a custom field using `createField
155155
Make sure `isControlled` is set to true and call the `onChange` handler inside the `onFileChange` callback to pass the file to the form state.
156156
157157
```jsx
158-
import { Text, HStack } from '@chakra-ui/react'
158+
import { Text, HStack, Button } from '@chakra-ui/react'
159159
import {
160160
FileUpload,
161161
FileUploadTrigger,
162162
FileUploadDropzone,
163-
} from '@saas-ui/file-upload'
164-
import { Form, FormLayout, createField } from '@saas-ui/forms'
163+
} from '@saas-ui/file-upload'
164+
import {
165+
Form,
166+
FormLayout,
167+
SubmitButton,
168+
} from '@saas-ui/react'
169+
import { createField } from '@saas-ui/forms'
170+
import { forwardRef } from 'react';
165171

166172
const UploadField = createField(
167173
forwardRef((props, ref) => {

0 commit comments

Comments
 (0)