-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Re-export FileTrigger to RSP #6295
Conversation
@@ -155,6 +156,13 @@ A React implementation of Spectrum, Adobe’s design system. | |||
<ActionGroup /> | |||
</ExampleCard> | |||
|
|||
<ExampleCard | |||
url="https://react-spectrum.adobe.com/react-aria/FileTrigger.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it confusing to link to the react-aria docs cause then it says to import file trigger from react-aria-components
. the only place where it's known that you can import filetrigger from @adobe/react-spectrum
are the examples in the RSP dropzone docs
should we just create docs for filetrigger that are mostly copied from rac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I forgot that people might want to use FileTrigger standalone. Might be worth making a copy of the docs in RSP in that case then so that it shows up in the sidebar as well
Build successful! 🎉 |
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted a couple minor things.
## Example | ||
|
||
```tsx example | ||
import {FileTrigger, Button} from '@adobe/react-spectrum'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't our pattern to use @react-spectrum/dropzone.mdx
and have the docs build replace it with @adobe/react-spectrum
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh im not sure. do you mind clarifying what you mean? i checked some other doc examples and they seem to import from '@adobe/react-spectrum'
directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it really matters either way, just so long as the final result is that the import shows the mono package
Build successful! 🎉 |
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure of the docs for FileTrigger is a bit different from that of the other RSP components but I think its fine.
Build successful! 🎉 |
A bit overkill to add an entire new package just for a re-export, but ok I guess. 😄 |
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'any' } @react-spectrum/filetriggerFileTrigger-
+FileTrigger {
+ acceptDirectory?: boolean
+ acceptedFileTypes?: Array<string>
+ allowsMultiple?: boolean
+ children?: ReactNode
+ defaultCamera?: 'user' | 'environment'
+ onSelect?: (FileList | null) => void
+} FileTriggerProps-
+FileTriggerProps {
+ acceptDirectory?: boolean
+ acceptedFileTypes?: Array<string>
+ allowsMultiple?: boolean
+ children?: ReactNode
+ defaultCamera?: 'user' | 'environment'
+ onSelect?: (FileList | null) => void
+} |
Closes
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: