({
color = 'currentColor',
size = 24,
stroke = 2,
title,
children,
className = '',
class: classes = '',
style,
...rest
}: IconProps)
| 9 | iconNode: IconNode, |
| 10 | ): Icon => { |
| 11 | const Component = ({ |
| 12 | color = 'currentColor', |
| 13 | size = 24, |
| 14 | stroke = 2, |
| 15 | title, |
| 16 | children, |
| 17 | className = '', |
| 18 | class: classes = '', |
| 19 | style, |
| 20 | ...rest |
| 21 | }: IconProps) => |
| 22 | h( |
| 23 | 'svg' as any, |
| 24 | { |
| 25 | ...defaultAttributes[type], |
| 26 | width: String(size), |
| 27 | height: String(size), |
| 28 | class: [`tabler-icon`, `tabler-icon-${iconName}`, classes, className].join(' '), |
| 29 | ...(type === 'filled' |
| 30 | ? { |
| 31 | fill: color, |
| 32 | } |
| 33 | : { |
| 34 | 'stroke-width': stroke, |
| 35 | stroke: color, |
| 36 | }), |
| 37 | style, |
| 38 | ...rest, |
| 39 | }, |
| 40 | [ |
| 41 | title && h('title', {}, title), |
| 42 | ...iconNode.map(([tag, attrs]) => h(tag, attrs)), |
| 43 | ...toChildArray(children), |
| 44 | ], |
| 45 | ); |
| 46 | |
| 47 | Component.displayName = `${iconNamePascal}`; |
| 48 |
no outgoing calls
no test coverage detected