Skip to content

Commit

Permalink
Fixes #1757 - Add spritemap prop to pass through to Icon
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceosterhaus committed Apr 5, 2019
1 parent e674a9d commit 1b730ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/clay-label/src/ClayLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ interface Props
* Flag to indicate if the label should be of the `large` variant.
*/
large?: boolean;

/**
* Path to the location of the spritemap resource used for Icon.
*/
spritemap?: string;
}

const ClayLabel: React.FunctionComponent<Props> = ({
Expand All @@ -35,6 +40,7 @@ const ClayLabel: React.FunctionComponent<Props> = ({
displayType = 'secondary',
href,
large = false,
spritemap,
...otherProps
}) => {
const TagName = href ? 'a' : 'span';
Expand All @@ -58,7 +64,7 @@ const ClayLabel: React.FunctionComponent<Props> = ({
className="close"
type="button"
>
<Icon symbol="times" />
<Icon spritemap={spritemap} symbol="times" />
</button>
</span>
)}
Expand Down

0 comments on commit 1b730ea

Please sign in to comment.