import { Button, IconButton } from "@medusajs/ui" import * as MedusaIcons from "@medusajs/icons" import * as CustomIcons from "@modules/common/icons" import { LayoutComponentDefinition, LayoutContext, } from "@vibentec/component-map" export default function VtButton({ nodes, context, }: { nodes: LayoutComponentDefinition context: LayoutContext }) { const props = nodes.config || {} const iconName = props.icon as string | undefined const IconComponent = iconName ? (MedusaIcons as Record)[iconName] ?? (CustomIcons as Record)[iconName] : undefined return ( <> {props?.icon && ( {IconComponent && ( )} {props?.label && ( {props.label} )} )} {!props?.icon && ( )} ) }