diff --git a/src/common/Toast/ToastItem/ToastItem.js b/src/common/Toast/ToastItem/ToastItem.js index 869aa224f..87e7fb1ad 100644 --- a/src/common/Toast/ToastItem/ToastItem.js +++ b/src/common/Toast/ToastItem/ToastItem.js @@ -9,7 +9,7 @@ const styles = require('./styles'); const ToastItem = ({ title, message, dataset, onSelect, onClose, ...props }) => { const type = React.useMemo(() => { - return ['success', 'alert', 'error'].includes(props.type) ? + return ['success', 'alert', 'info', 'error'].includes(props.type) ? props.type : 'success'; @@ -18,7 +18,8 @@ const ToastItem = ({ title, message, dataset, onSelect, onClose, ...props }) => return typeof props.icon === 'string' ? props.icon : type === 'success' ? 'checkmark' : type === 'error' ? 'warning' : - null; + type === 'info' ? 'about' : + null; }, [type, props.icon]); const toastOnClick = React.useCallback((event) => { if (!event.nativeEvent.selectToastPrevented && typeof onSelect === 'function') { @@ -81,7 +82,7 @@ const ToastItem = ({ title, message, dataset, onSelect, onClose, ...props }) => }; ToastItem.propTypes = { - type: PropTypes.oneOf(['success', 'alert', 'error']), + type: PropTypes.oneOf(['success', 'alert', 'info', 'error']), title: PropTypes.string, message: PropTypes.string, icon: PropTypes.string, diff --git a/src/common/Toast/ToastItem/styles.less b/src/common/Toast/ToastItem/styles.less index 05bf68ec8..c838baf80 100644 --- a/src/common/Toast/ToastItem/styles.less +++ b/src/common/Toast/ToastItem/styles.less @@ -33,6 +33,16 @@ } } + &.info { + .icon-container { + background-color: @color-primary-light2; + + .icon { + color: @color-surface-light5-90; + } + } + } + .icon-container { flex: none; align-self: stretch;