added packages to support markdown
added dummy pages for about and contact. updated tailwind.config.js to include config/*.json to scan for classes. refactored system basics. Removed component-props, using generic LayoutComponentDefinition and LayoutContext. cleanup component-map. Updated renderer to be more failsafe. new abstracted components: vt-mega-menu, vt-sidemenu, vt-banner with 3 variants, vt-header, vt-homebutton, vt-cartbutton, vt-accountbutton, vt-linkbutton,
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { DynamicLayoutRenderer } from "vibentec/renderer"
|
||||
import { LayoutComponentDefinition, LayoutContext } from "vibentec/component-map";
|
||||
import { clx } from "@medusajs/ui";
|
||||
|
||||
export default function VtHeader({ nodes, context }: { nodes: LayoutComponentDefinition; context: LayoutContext }) {
|
||||
const { sticky = true } = nodes.config ?? {};
|
||||
const cName = clx(sticky && "sticky top-0","inset-x-0 z-50 group");
|
||||
|
||||
return (
|
||||
<header className={cName}>
|
||||
{ nodes.children && <DynamicLayoutRenderer nodes={nodes.children} context={context} /> }
|
||||
</header>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user