-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: composable primitive components #947
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
I like how this is looking! I would probably add some basic styling to the examples, to at least identify the component, since right now, it kind of just looks like the page is broken, rather than there is another dropzone:
I think this is plenty in the examples, i'd potentially want to add an example
Tentatively I would say it doesn't need to be split for now, but cc @juliusmarminge -- thoughts? |
Kinda feels like it should be split? Should our default component use these primitives? A lot of code duplication if not? |
I guess not, perhaps a leading section with the level of theming possible with links to respective section could be sufficient |
This PR adds unstyled composable components through
generateUploadPrimitives
which returns:<Root>
<Dropzone>
<Button>
<AllowedContent>
I've also added examples for
minimal-appdir
,minimal-pagedir
,with-clerk-appdir
,with-clerk-pagedir
. I can add it to all the rest of the react ones if needed.All these components accept parameters as children like
({ isUploading }) => <></>
.There is no
asChild
oras={YourComponent}
prop at the moment as I'm not sure which one to use.I haven't implemented the docs either as I'm not sure if the current styling page should be split up.