On this page
TypeScript
Types exported by each package and how to type props that take an icon.
Exported types
| Type | From | Describes |
|---|---|---|
XIcon | @axcore/xicons-react | An icon component |
XIconProps | @axcore/xicons-react | Its props: SVGProps plus size and title |
IconProps | @axcore/xicons-react | Props of the brand Icon component |
IconData | @axcore/xicons | Raw icon data passed to toSvg |
IconVariant | @axcore/xicons | "original" | "mono" | "branded" |
Props that take an icon
import type { XIcon } from "@axcore/xicons-react";export function Feature({ icon: Icon, label }: { icon: XIcon; label: string }) { return ( <li className="flex items-center gap-2"> <Icon size={18} /> {label} </li> );}Something wrong or missing?Open an issue