Skip to content

Commit

Permalink
Merge pull request #1835 from habx/feature/success-toaster-notification
Browse files Browse the repository at this point in the history
APP-20755: Add toaster notifications of type `success`
  • Loading branch information
habx-auto-merge[bot] authored May 4, 2021
2 parents 9b8d474 + a206b8e commit d12b6b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/useGetColorFromType.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import { useThemeVariant } from './useThemeVariant'

export type ColorType = 'info' | 'error' | 'warning'
export type ColorType = 'error' | 'info' | 'success' | 'warning'

export const useGetColorFromType = () => {
const theme = useThemeVariant()

return (type: ColorType) => {
switch (type) {
case 'error':
return theme.colors.error.base
case 'warning':
return theme.colors.warning.base
case 'info':
return theme.colors.secondary.base
case 'success':
return theme.colors.success.base
case 'warning':
return theme.colors.warning.base
}
}
}

0 comments on commit d12b6b8

Please sign in to comment.