Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
feat(Icon): Add new flag shorthand prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthomp committed May 26, 2018
1 parent 25eaa87 commit ad208cc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Icon/Icon.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ type Props = {|
+name: string,
+isAriaHidden?: boolean,
/**
* Use the built in payment icon set
* Use the built-in payment icon set
*/
+payment?: boolean,
/**
* Use the built-in flag icon set
*/
+flag?: boolean,
|};

/**
Expand All @@ -35,8 +39,9 @@ function Icon({
link,
isAriaHidden,
payment,
flag,
}: Props): React.Node {
const prefix = payment ? "payment" : prefixFromProps;
const prefix = (payment && "payment") || (flag && "flag") || prefixFromProps;
const classes = cn(
{
[prefix]: true,
Expand Down

0 comments on commit ad208cc

Please sign in to comment.