refactor(ui): extract reusable component package
This commit is contained in:
parent
87261b5a3f
commit
2664804e91
86 changed files with 102 additions and 85 deletions
|
|
@ -1,21 +0,0 @@
|
|||
import { Icon } from "@iconify/react";
|
||||
|
||||
export interface IconGlyphProps {
|
||||
name?: string;
|
||||
label?: string;
|
||||
size?: "sm" | "md" | "lg";
|
||||
}
|
||||
|
||||
export function IconGlyph({ name, label, size = "md" }: IconGlyphProps) {
|
||||
return (
|
||||
<span
|
||||
className="icon-glyph"
|
||||
data-size={size}
|
||||
data-icon-name={name}
|
||||
aria-label={label}
|
||||
aria-hidden={label ? undefined : "true"}
|
||||
>
|
||||
{name ? <Icon icon={name} /> : null}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue