UNPKG

icon-picker-react

Version:

Componente de seleção de ícones dinamicamente

16 lines (15 loc) 656 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Icon; const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = require("react"); const FaIconsList_1 = require("../../utils/FaIconsList"); const style_1 = require("./style"); function Icon({ icon, size, color }) { function findIcon() { const iconSelected = FaIconsList_1.iconFaList.find(i => i.label === icon); return iconSelected ? iconSelected : FaIconsList_1.iconFaList[0]; } ; return ((0, jsx_runtime_1.jsx)(style_1.Content, { size: size, color: color, children: (0, react_1.createElement)(findIcon().icon) })); }