-
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.
Merge pull request #122 from ballyalley-o/development
Feat/TCCP117-feature-snackbar-hook: Implement Snackbar hook
- Loading branch information
Showing
18 changed files
with
462 additions
and
115 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { default as useLocalStorage } from './use-local-storage' | ||
export * from './use-snack' | ||
export { useResponsive } from './use-responsive' | ||
export * from './use-icon' | ||
export { default as useLocalStorage } from './use-local-storage' |
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,3 @@ | ||
export * from 'notistack' | ||
export { enqueueSnackbar as snack } from 'notistack' | ||
export { default as SnackProvider } from './use-snack' |
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,42 @@ | ||
import { m } from 'framer-motion' | ||
import { Box } from '@mui/material' | ||
import { styled } from '@mui/material/styles' | ||
import { MaterialDesignContent } from 'notistack' | ||
|
||
export const SSnackContent = styled(MaterialDesignContent)(({ theme }) => ({ | ||
'&.notistack-MuiContent': { | ||
backgroundColor: theme.palette.common.white, | ||
display: 'flex', | ||
flexDirection: 'row', | ||
objectFit: 'cover', | ||
justifyContent: 'space-evenly', | ||
fontSize: theme.typography.overline.fontSize, | ||
color: theme.palette.common.black, | ||
padding: theme.spacing(2) | ||
}, | ||
'&.notistack-MuiContent-error': { | ||
backgroundColor: theme.palette.error.dark, | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
color: theme.palette.common.white, | ||
padding: 0 | ||
}, | ||
'&.notistack-MuiContent-success': { | ||
flexDirection: 'row', | ||
padding: 0 | ||
}, | ||
'&.notistack-MuiContent-warning': { | ||
backgroundColor: theme.palette.common.white, | ||
flexDirection: 'row', | ||
padding: 0 | ||
} | ||
})) | ||
|
||
export const SSnackIconMDiv = styled(Box)(({ theme, color }) => ({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
color: theme.palette.grey[500], | ||
width: 30, | ||
height: 30 | ||
})) |
Oops, something went wrong.