Skip to content

Commit aaba4ec

Browse files
committed
refactor: update IconBaseProps documentation
1 parent d8b6108 commit aaba4ec

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Shared/Components/Icon/types.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@ import { TooltipProps } from '@Common/Tooltip/types'
55
type IconMap = Record<string, FC<SVGProps<SVGSVGElement>>>
66

77
export interface IconBaseProps extends Pick<SVGAttributes<SVGSVGElement>, 'strokeWidth'> {
8+
/** The name of the icon to render. */
89
name: keyof IconMap
10+
/** The map containing all available icons. */
911
iconMap: IconMap
12+
/**
13+
* The size of the icon in pixels.
14+
* @default 16
15+
*/
1016
size?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 28 | 30 | 32 | 34 | 36 | 40 | 42 | 44 | 48 | 72 | 80
17+
/** Props to configure the tooltip when hovering over the icon. */
1118
tooltipProps?: TooltipProps
19+
/**
20+
* The color of the icon (color tokens). \
21+
* If `null`, the default color present in icon is used.
22+
* @example `'B500'`, `'N200'`, `'G50'`, `'R700'`
23+
*/
1224
color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50'}` | null
1325
}

0 commit comments

Comments
 (0)