@copilotkit/a2ui-renderer
Version:
A2UI Renderer for CopilotKit - render A2UI surfaces in React applications
1 lines • 1.22 kB
Source Map (JSON)
{"version":3,"file":"icon.mjs","names":[],"sources":["../../../../src/web-components/catalog/basic/icon.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { IconApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { createLitComponent } from \"../../adapter\";\nimport { getBaseLeafStyle } from \"./utils\";\n\nexport const Icon = createLitComponent(IconApi, ({ props }) => {\n const iconName =\n typeof props.name === \"string\"\n ? props.name\n : (props.name as { path?: string } | undefined)?.path;\n return html`\n <span\n class=\"material-symbols-outlined\"\n style=${styleMap({\n ...getBaseLeafStyle(),\n fontSize: \"24px\",\n width: \"24px\",\n height: \"24px\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n })}\n >${iconName}</span\n >\n `;\n});\n"],"mappings":";;;;;;;AAMA,MAAa,OAAO,mBAAmB,UAAU,EAAE,YAAY;CAC7D,MAAM,WACJ,OAAO,MAAM,SAAS,WAClB,MAAM,OACL,MAAM,MAAwC;AACrD,QAAO,IAAI;;;cAGC,SAAS;EACf,GAAG,kBAAkB;EACrB,UAAU;EACV,OAAO;EACP,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,gBAAgB;EACjB,CAAC,CAAC;SACA,SAAS;;;EAGhB"}