import * as React from 'react' ; import Icon , { Check2M , WarningFillM , InfoM } from '@synerise/ds-icon' ; import { InlineAlertProps , InlineAlertType } from './InlineAlert.types' ; import * as S from './InlineAlert.styles' ; const ICONS = { success : < Check2M />, alert : < WarningFillM />, warning : < WarningFillM />, info : < InfoM />, } ; const InlineAlert = ( { type = 'warning' , message } ) => { const icon = React . useMemo ( ( ) => { return ICONS [ type ] ; } , [ type ] ) ; return ( < S . InlineAlertWrapper type = { type } className = "ds-inline-alert" > < Icon component = { icon } /> < S . Message > { message } < /S.Message> < /S.InlineAlertWrapper>); } ; export default InlineAlert ;