From 1bf946a5e1ad5e6bd99021ebd198a2f3c670e614 Mon Sep 17 00:00:00 2001 From: Michael Arestad Date: Thu, 28 Jul 2022 09:57:21 -0600 Subject: [PATCH] Tweak type requirement --- code/lib/components/src/icon/icon.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/components/src/icon/icon.tsx b/code/lib/components/src/icon/icon.tsx index 7740e96132c6..531d4f8b537e 100644 --- a/code/lib/components/src/icon/icon.tsx +++ b/code/lib/components/src/icon/icon.tsx @@ -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: ``) * - *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: ``) */ -export interface IconProps { - icon: IconType; +export interface IconsProps { + icon?: IconType; symbol?: IconType; } -export const Icons: FunctionComponent = ({ icon, symbol, ...props }: IconProps) => { +export const Icons: FunctionComponent = ({ icon, symbol, ...props }: IconsProps) => { return ( {symbol ? : icons[icon]}