Skip to content
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

Add hooks to draft exports #2260

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Add hooks to draft exports #2260

merged 1 commit into from
Aug 23, 2022

Conversation

iansan5653
Copy link
Contributor

Very minor PR to add the hooks in drafts/hooks/ to the exports defined in drafts/index.ts. I intended to do this when I introduced them but forgot.

The only hook I excluded is useUnifiedFileSelect because I think the use-case is fairly specific here and it's not worth making it public if we want to more easily change the implementation later. If someone requests it we can export it.

@iansan5653 iansan5653 self-assigned this Aug 23, 2022
@iansan5653 iansan5653 requested review from a team and rezrah August 23, 2022 17:34
@changeset-bot
Copy link

changeset-bot bot commented Aug 23, 2022

🦋 Changeset detected

Latest commit: bebfd94

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@@ -39,5 +39,5 @@ export type {MarkdownEditorProps} from './MarkdownEditor'
export type {Emoji} from './suggestions/_useEmojiSuggestions'
export type {Mentionable} from './suggestions/_useMentionSuggestions'
export type {Reference} from './suggestions/_useReferenceSuggestions'
export type {FileUploadResult} from './_useFileHandling'
export type {FileUploadResult, FileType} from './_useFileHandling'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added FileType to the MarkdownEditor exports because it's useful when building the acceptedFileTypes prop.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
dist/browser.esm.js 75.62 KB (0%)
dist/browser.umd.js 76.23 KB (0%)

@iansan5653 iansan5653 temporarily deployed to github-pages August 23, 2022 17:41 Inactive
@@ -0,0 +1,5 @@
export * from './useCombobox'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't 100% sure if I can just export * vs calling out each export type individually, but it appears to work fine based on the export * from './MarkdownViewer' in the drafts/index.ts file.

@iansan5653 iansan5653 merged commit 88b8c0e into main Aug 23, 2022
@iansan5653 iansan5653 deleted the export-draft-hooks branch August 23, 2022 18:39
@primer-css primer-css mentioned this pull request Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants