Skip to content

pantoken-root / formats/icons/src / getIcon

Funció: getIcon() ​

getIcon(name): PantokenIcon | undefined

Beta

Cercar una icona pel seu nom.

Paràmetres ​

name ​

string

Retorna ​

PantokenIcon | undefined

Exemple ​

ts
import { getIcon } from "@pantoken/icons";

const icon = getIcon("arrow-left");
icon?.viewBox; // "0 0 24 24"