import { useMemo, FC } from 'react'; import cx from 'classnames'; import { Icon } from '../icon'; import { IAlertProps, Alert } from '../alert'; export type PromptType = 'warning' | 'strongHint' | 'weakHint'; export type IPromptProps = IAlertProps & { type: PromptType; }; const promptTypePropsMap: Record> = { warning: { type: 'warning', }, strongHint: { type: 'warning', style: { background: '#f7f7f7' }, }, weakHint: { icon: , style: { background: '#f7f7f7' }, }, }; export const Prompt: FC = ({ title, style = {}, type = 'warning', className, closable = true, ...resetProps }) => { const alertProps: Partial = useMemo( () => promptTypePropsMap[type] || {}, [type] ); const { style: promptStyle = {} } = alertProps; const promptClassName = cx('zent-prompt', className); return ( ); }; export default Prompt;