Skip to content

Commit

Permalink
ErrorMessage: add icon attribute only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcastro2 authored and slint committed Nov 28, 2023
1 parent 8cde6ba commit c047226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/elements/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ErrorMessage extends Component {
const { header, errors, content, icon, ...uiProps } = this.props;

return (
<Message icon {...uiProps}>
<Message icon={Boolean(icon)} {...uiProps}>
{icon && <Icon name={icon} />}
<Message.Content role="alert">
{header && <Message.Header>{header}</Message.Header>}
Expand Down

0 comments on commit c047226

Please sign in to comment.