Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
feat(status-icon): add info and defaultTo props
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric authored and varl committed Nov 25, 2019
1 parent d0060bc commit 8144311
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/icons/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ export const StatusIconNoDefault = ({
warning,
valid,
loading,
info,
className,
defaultTo,
}) =>
valid ? (
<Valid className={className} />
Expand All @@ -183,12 +185,22 @@ export const StatusIconNoDefault = ({
<Error className={className} />
) : loading ? (
<Loading className={className} />
) : null
) : info ? (
<Info className={className} />
) : (
defaultTo
)

StatusIconNoDefault.defaultProps = {
defaultTo: null,
}

StatusIconNoDefault.propTypes = {
valid: propTypes.bool,
error: propTypes.bool,
warning: propTypes.bool,
loading: propTypes.bool,
info: propTypes.bool,
className: propTypes.string,
defaultTo: propTypes.element,
}

0 comments on commit 8144311

Please sign in to comment.