-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-toast): add base hooks/types and re-exports for headless composition #35914
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
Open
dmytrokirpa
wants to merge
8
commits into
microsoft:master
Choose a base branch
from
dmytrokirpa:feat/react-toast-base-hooks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5af8e0a
feat(react-toast): add base hooks for Toast, ToastTitle, and ToastBody
dmytrokirpa ffdcb44
fixup
dmytrokirpa 012080d
Merge branch 'master' into feat/react-toast-base-hooks
dmytrokirpa eccfc97
feat(react-headless-components-preview): add Toast component (cherry-…
dmytrokirpa 217f07a
update toaster components, add tests, improve stories (cherry-picked …
dmytrokirpa 0556c56
fix api-extractor warning
dmytrokirpa 995c7d5
Merge branch 'master' into feat/react-toast-base-hooks
dmytrokirpa 79afd1a
fix(react-toast): expose transitively-referenced types in public API
dmytrokirpa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "feat: add useToastBase_unstable, useToastTitleBase_unstable, and useToastBodyBase_unstable hooks", | ||
| "packageName": "@fluentui/react-toast", | ||
| "email": "dmytrokirpa@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,16 @@ | ||
| export type { ToastContextValues, ToastProps, ToastSlots, ToastState } from './components/Toast/index'; | ||
| export type { | ||
| ToastBaseProps, | ||
| ToastBaseState, | ||
| ToastContextValues, | ||
| ToastProps, | ||
| ToastSlots, | ||
| ToastState, | ||
| } from './components/Toast/index'; | ||
| export { | ||
| Toast, | ||
| renderToast_unstable, | ||
| toastClassNames, | ||
| useToastStyles_unstable, | ||
| useToastBase_unstable, | ||
| useToast_unstable, | ||
| } from './components/Toast/index'; |
9 changes: 8 additions & 1 deletion
9
packages/react-components/react-toast/library/src/ToastBody.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| export type { ToastBodyProps, ToastBodySlots, ToastBodyState } from './components/ToastBody/index'; | ||
| export type { | ||
| ToastBodyBaseProps, | ||
| ToastBodyBaseState, | ||
| ToastBodyProps, | ||
| ToastBodySlots, | ||
| ToastBodyState, | ||
| } from './components/ToastBody/index'; | ||
| export { | ||
| ToastBody, | ||
| renderToastBody_unstable, | ||
| toastBodyClassNames, | ||
| useToastBodyStyles_unstable, | ||
| useToastBodyBase_unstable, | ||
| useToastBody_unstable, | ||
| } from './components/ToastBody/index'; |
9 changes: 8 additions & 1 deletion
9
packages/react-components/react-toast/library/src/ToastTitle.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| export type { ToastTitleProps, ToastTitleSlots, ToastTitleState } from './components/ToastTitle/index'; | ||
| export type { | ||
| ToastTitleBaseProps, | ||
| ToastTitleBaseState, | ||
| ToastTitleProps, | ||
| ToastTitleSlots, | ||
| ToastTitleState, | ||
| } from './components/ToastTitle/index'; | ||
| export { | ||
| ToastTitle, | ||
| renderToastTitle_unstable, | ||
| toastTitleClassNames, | ||
| useToastTitleStyles_unstable, | ||
| useToastTitleBase_unstable, | ||
| useToastTitle_unstable, | ||
| } from './components/ToastTitle/index'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
packages/react-components/react-toast/library/src/components/Toast/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| export { Toast } from './Toast'; | ||
| export type { ToastContextValues, ToastProps, ToastSlots, ToastState } from './Toast.types'; | ||
| export type { | ||
| ToastBaseProps, | ||
| ToastBaseState, | ||
| ToastContextValues, | ||
| ToastProps, | ||
| ToastSlots, | ||
| ToastState, | ||
| } from './Toast.types'; | ||
| export { renderToast_unstable } from './renderToast'; | ||
| export { useToast_unstable } from './useToast'; | ||
| export { useToastBase_unstable, useToast_unstable } from './useToast'; | ||
| export { toastClassNames, useToastStyles_unstable } from './useToastStyles.styles'; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.