()
| 69 | Omit<AlertProps, 'actions'> & RendererProps |
| 70 | > { |
| 71 | render() { |
| 72 | let {render, body, level, icon, showIcon, actions, ...rest} = this.props; |
| 73 | if (isPureVariable(level)) { |
| 74 | level = resolveVariableAndFilter(level, this.props.data); |
| 75 | } |
| 76 | if (isPureVariable(icon)) { |
| 77 | icon = resolveVariableAndFilter(icon, this.props.data); |
| 78 | } |
| 79 | if (isPureVariable(showIcon)) { |
| 80 | showIcon = resolveVariableAndFilter(showIcon, this.props.data); |
| 81 | } |
| 82 | |
| 83 | const actionsDom: React.ReactNode = actions |
| 84 | ? React.isValidElement(actions) |
| 85 | ? actions |
| 86 | : render('alert-actions', actions) |
| 87 | : null; |
| 88 | |
| 89 | return ( |
| 90 | <Alert |
| 91 | {...rest} |
| 92 | level={level} |
| 93 | icon={icon} |
| 94 | showIcon={showIcon} |
| 95 | actions={actionsDom} |
| 96 | > |
| 97 | {render('body', body)} |
| 98 | </Alert> |
| 99 | ); |
| 100 | } |
| 101 | } |
nothing calls this directly
no test coverage detected