feat(react): new component FileUpload - #4540
Conversation
🦋 Changeset detectedLatest commit: a833b4a The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
One issue I have encountered: because all the components are in one common |
mimarz
left a comment
There was a problem hiding this comment.
Note to self: Me and @eirikbacker want to try and see if we can reduce the number of sub-components to promote composition of existing components.
Not only that, but I can bet you people will use <Input> inside <Fileupload> (instead of <Fileupload.Input>), and we should see if we can make that work.
New suggestion for how to use <Field>
<Label>Upload file</Label>
<FileUpload>
<Field.Description>Drop file here</Field.Description>
<Field.Description>
File must be in csv format and less than 2MB
</Field.Description>
<Button variant="secondary" asChild>
<span>Upload file</Button>
</Label>
<Input type='file' />
</FileUpload>
</Field>vs current with sub-components: <Field>
<Label>Upload file</Label>
<FileUpload>
<FileUpload.Description>Drop file here</FileUpload.Description>
<FileUpload.Description>
File must be in csv format and less than 2MB
</FileUpload.Description>
<FileUpload.FakeButton>Upload file</FileUpload.FakeButton>
<FileUpload.Input />
</FileUpload>
</Field> |
mimarz
left a comment
There was a problem hiding this comment.
Me and @eirikbacker did some changes to reduce sub-components and added react-dropzone examples.
@Barsnes will do a last buddycheck tomorrow.



resolves #1236