-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(Toast): add placement prop to ToastContainer #7609
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,11 @@ import {Toaster} from './Toaster'; | |
import {ToastOptions, ToastQueue, useToastQueue} from '@react-stately/toast'; | ||
import {useSyncExternalStore} from 'use-sync-external-store/shim/index.js'; | ||
|
||
export interface SpectrumToastContainerProps extends AriaToastRegionProps {} | ||
export type ToastPlacement = 'top start' | 'top' | 'top end' | 'bottom start' | 'bottom' | 'bottom end'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know that we specified in the ticket that we'd only support this set of placement, but it just occurred to me that we support |
||
|
||
export interface SpectrumToastContainerProps extends AriaToastRegionProps { | ||
placement?: ToastPlacement | ||
} | ||
|
||
export interface SpectrumToastOptions extends Omit<ToastOptions, 'priority'>, DOMProps { | ||
/** A label for the action button within the toast. */ | ||
|
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.
How does the team feel about a blurb for mfe's that may have multiple ToastContainers?
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 catch! I checked and we currently don't talk about multiple ToastContainers in the docs. Do we need a general section on that or continue not documenting it?
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.
Going to be editing more docs soon, so I'll do this in a follow up!