chore(SW-3246): Moved Alert component into design system * chore(SW-3246): Moved Alert component into design system * chore(SW-3246): Optimsed code and imports * chore(SW-3246): Moved type AlertTypeEnum and other to common package Approved-by: Anton Gunnarsson
25 lines
588 B
TypeScript
25 lines
588 B
TypeScript
import { cva } from 'class-variance-authority'
|
|
|
|
import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert'
|
|
|
|
import styles from './alert.module.css'
|
|
|
|
export const alertVariants = cva(styles.alert, {
|
|
variants: {
|
|
variant: {
|
|
inline: styles.inline,
|
|
banner: styles.banner,
|
|
},
|
|
type: {
|
|
[AlertTypeEnum.Info]: styles.info,
|
|
[AlertTypeEnum.Warning]: styles.warning,
|
|
[AlertTypeEnum.Alarm]: styles.alarm,
|
|
[AlertTypeEnum.Success]: styles.success,
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: 'inline',
|
|
type: AlertTypeEnum.Info,
|
|
},
|
|
})
|