Icon
Description
Section titled “Description”The Icon component renders an SVG icon based on the provided name,size.
Component
Section titled “Component”Properties
Section titled “Properties”Icons reference icons.
The IconProperties extends <React.HTMLAttributes<HTMLElement> which means it includes all standard HTML attributes that can be applied to an HTML element.
| Prop | Type | Description | Optional |
|---|---|---|---|
name | ToyotaIcon | LexusIcon | Icon name to display from the library | ❌ |
size | Size | Defines the size of the icon | ✅ |
className | ClassValue | Custom classNames you want to apply on the icon element | ✅ |
Example
Section titled “Example”import { Icon } from '@tmedxp/react-components/atoms/icon';
const IconExample = () => { return <Icon name="car" size="lg" className="custom_class" />;};
export { IconExample };Storybook
Section titled “Storybook”- Try the Icon component in storybook: https://stunning-adventure-o796gr1.pages.github.io/?path=/story/ux-library-atoms-icon—icon-selector