UNPKG

alchemy-tech-ui

Version:

react component library for alchemy apps

54 lines (51 loc) 1.36 kB
import React from 'react'; import Menu from './icons/Menu.mjs'; import Expand from './icons/Expand.mjs'; import Collapse from './icons/Collapse.mjs'; import Menu$1 from './icons/CommandLine.mjs'; import Menu$2 from './icons/Play.mjs'; import Menu$3 from './icons/Pause.mjs'; import Profile from './icons/Profile.mjs'; import Close from './icons/Close.mjs'; import Phone from './icons/Phone.mjs'; import Email from './icons/Email.mjs'; import Document from './icons/Document.mjs'; import Edit from './icons/Edit.mjs'; var icons = { Menu: Menu, Expand: Expand, Collapse: Collapse, CommandLine: Menu$1, Play: Menu$2, Pause: Menu$3, Profile: Profile, Close: Close, Phone: Phone, Email: Email, Document: Document, Edit: Edit }; var sizes = { sm: "12px", md: "24px", lg: "32px", xl: "48px" }; function Icon(_a) { var type = _a.type, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.color, color = _c === void 0 ? "black" : _c; var SelectedIcon = icons[type]; if (!SelectedIcon) { console.warn("icon with type ".concat(type, " not found")); return React.createElement("div", null, type); } return React.createElement( "div", { style: { width: sizes[size], height: sizes[size], color: color } }, React.createElement(SelectedIcon, null) ); } export { Icon as default };