(props: { name: string, className?: string } & React.HTMLAttributes<HTMLSpanElement>)
| 3 | import React from 'react'; |
| 4 | |
| 5 | export default function IconComponent(props: { name: string, className?: string } & React.HTMLAttributes<HTMLSpanElement>) { |
| 6 | const { |
| 7 | name, |
| 8 | className, |
| 9 | ...rest |
| 10 | } = props; |
| 11 | const cn = classNames(className, `icon icon-${name}`); |
| 12 | return ( |
| 13 | <span {...rest} className={cn} /> |
| 14 | ); |
| 15 | } |
| 16 | |
| 17 | IconComponent.propTypes = { |
| 18 | name: PropTypes.string.isRequired, |
nothing calls this directly
no outgoing calls
no test coverage detected