-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hotfix]: fix all the bugs that introduced in the previous release (#317
- Loading branch information
Showing
27 changed files
with
440 additions
and
410 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,20 @@ | ||
import { AlertColor, AlertProps as MuiAlertProps, SnackbarProps as MuiSnackbarProps, SnackbarOrigin, TypographyProps } from '@mui/material' | ||
import { createContext, ReactNode } from 'react' | ||
|
||
export interface SnackbarOptions { | ||
snackbarProps: Omit<MuiSnackbarProps, 'open' | 'onClose' | 'autoHideDuration' | 'anchorOrigin'> | ||
alertProps: Omit<MuiAlertProps, 'onClose' | 'severity'> | ||
autoHideDuration: number | null | ||
typographyProps: TypographyProps | ||
alertColor: AlertColor | undefined | ||
bgcolor: TypographyProps['color'] | ||
textColor: TypographyProps['color'] | ||
anchorOrigin: SnackbarOrigin | ||
} | ||
|
||
export interface SnackbarContextValue { | ||
showSnackbar: (message: ReactNode, options?: Partial<SnackbarOptions>) => Promise<number> | ||
closeSnackbar: (key: number) => Promise<boolean> | ||
} | ||
|
||
export const SnackbarContext = createContext<SnackbarContextValue | null>(null) |
This file contains 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 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,3 +1,5 @@ | ||
export { SnackbarContext, SnackbarElement, SnackbarProvider } from './SnackbarProvider' | ||
export type { SnackbarContextValue, SnackbarValue } from './SnackbarProvider' | ||
export { SnackbarContext } from './SnackbarContext' | ||
export type { SnackbarContextValue, SnackbarOptions } from './SnackbarContext' | ||
export { SnackbarElement, SnackbarProvider } from './SnackbarProvider' | ||
export type { SnackbarValue } from './SnackbarProvider' | ||
export { useSnackbar } from './useSnackbar' |
This file contains 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 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
Oops, something went wrong.