Skip to content

Commit

Permalink
Tweak type requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelArestad committed Aug 2, 2022
1 parent 36ad747 commit 1bf946a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/lib/components/src/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const Svg = styled.svg`
* - *decorative only*: for example, it illustrates a label next to it. We must ensure that it is ignored by screen readers, by setting `aria-hidden` attribute (ex: `<Icon icon="check" aria-hidden />`)
* - *non-decorative*: it means that it delivers information. For example, an icon as only child in a button. The meaning can be obvious visually, but it must have a proper text alternative via `aria-label` for screen readers. (ex: `<Icon icon="print" aria-label="Print this document" />`)
*/
export interface IconProps {
icon: IconType;
export interface IconsProps {
icon?: IconType;
symbol?: IconType;
}

export const Icons: FunctionComponent<IconProps> = ({ icon, symbol, ...props }: IconProps) => {
export const Icons: FunctionComponent<IconsProps> = ({ icon, symbol, ...props }: IconsProps) => {
return (
<Svg viewBox="0 0 14 14" width="14px" height="14px" {...props}>
{symbol ? <use xlinkHref={`#icon--${symbol}`} /> : icons[icon]}
Expand Down

0 comments on commit 1bf946a

Please sign in to comment.