feat(layout-system basics): Added component-map, component-props, configloader and renderer.

Added vt-template for nav and poc example footer.
Added ste.medusa-starter.design.json.
Probable starting point (main)/layout.tsx refactored to use dynamic layout renderer instead of hardcoded template.
This commit is contained in:
2025-11-19 18:19:25 +01:00
parent b7c67b5834
commit 51d6ee2051
8 changed files with 367 additions and 21 deletions
+68
View File
@@ -0,0 +1,68 @@
[
{
"Nav": {
"props": {},
"children": [
{
"Div": {
"props": { "className": "flex items-center h-full" },
"children": [
{
"LocalizedClientLink": {
"props": {
"href": "/",
"label": "Medusa Store",
"className": "bg-black txt-compact-xlarge-plus hover:text-ui-fg-base uppercase",
"data-testid": "nav-store-link"
}
}
}
]
}
},
{
"Div": {
"props": { "className": "flex items-center gap-x-6 h-full flex-1 basis-0 justify-end" },
"children": [
{
"LocalizedClientLink": {
"props": {
"href": "/account",
"label": "Account",
"className": "hover:text-ui-fg-base bg-black",
"data-testid": "nav-account-link"
}
}
},
{
"Suspense": {
"props": {
"fallback": [
{
"LocalizedClientLink": {
"props": {
"href": "/cart",
"label": "Cart (0)",
"className": "bg-black hover:text-ui-fg-base flex gap-2",
"data-testid": "nav-cart-link"
}
}
}
]
},
"children": [
{ "CartButton": {} }
]
}
}
]
}
}
]
}
},
{ "CartMismatchBanner": { "show": true } },
{ "FreeShippingPriceNudge": { "variant": "popup" } },
{ "PropsChildren" : {}},
{ "Footer": { "copyrightText": "© 2025 MyShop" } }
]