+
{props.right && }
diff --git a/src/modules/layout/templates/vt-icon-button/index.tsx b/src/modules/layout/templates/vt-icon-button/index.tsx
index 93b26d0..7494f8f 100644
--- a/src/modules/layout/templates/vt-icon-button/index.tsx
+++ b/src/modules/layout/templates/vt-icon-button/index.tsx
@@ -1,11 +1,11 @@
-import { IconButton } from "@medusajs/ui"
-import { MagnifyingGlass, User, ShoppingBag } from "@medusajs/icons"
+import { Button, IconButton } from "@medusajs/ui"
+import { MagnifyingGlass, User, ShoppingBag, Heart } from "@medusajs/icons"
import {
LayoutComponentDefinition,
LayoutContext,
} from "@vibentec/component-map"
-export default function VtIconButton({
+export default function VtButton({
nodes,
context,
}: {
@@ -13,16 +13,29 @@ export default function VtIconButton({
context: LayoutContext
}) {
const props = nodes.config || {}
- const variantsIcon = {
- search: MagnifyingGlass,
+
+ const icons = {
+ search: MagnifyingGlass,
user: User,
- cart: ShoppingBag
+ cart: ShoppingBag,
+ heart: Heart
}
- if (!props.variant) return null
- const Icon = variantsIcon[props.variant as keyof typeof variantsIcon]
+ const Icon = props.icon && icons[props.icon as keyof typeof icons]
return (
-
-
-
+ <>
+ {props?.icon && (
+
+
+ {props?.label && (
+ {props.label}
+ )}
+
+ )}
+ {!props?.icon && (
+
+ )}
+ >
)
}
diff --git a/src/modules/layout/templates/vt-nav/index.tsx b/src/modules/layout/templates/vt-nav/index.tsx
index a7d09b5..cf5a35f 100644
--- a/src/modules/layout/templates/vt-nav/index.tsx
+++ b/src/modules/layout/templates/vt-nav/index.tsx
@@ -14,13 +14,13 @@ export default function VtNav({ nodes, context }: { nodes: LayoutComponentDefini
return (