feat: create footer vibentec design and common component text
This commit is contained in:
@@ -23,7 +23,7 @@ export default async function VtFooter({
|
||||
const props = nodes?.config ?? {}
|
||||
|
||||
return (
|
||||
<footer className="relative mx-auto border-b duration-200 bg-white border-ui-border-base border-t-2">
|
||||
<footer className="relative mx-auto duration-200 bg-white border-ui-border-base border-t-2">
|
||||
{props.children && <DynamicLayoutRenderer nodes={props.children} context={context} />}
|
||||
</footer>
|
||||
)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { LayoutComponentDefinition } from "@vibentec/component-map"
|
||||
|
||||
import { LayoutContext } from "@vibentec/component-map"
|
||||
|
||||
export default function VtText({
|
||||
nodes,
|
||||
context,
|
||||
}: {
|
||||
nodes: LayoutComponentDefinition
|
||||
context: LayoutContext
|
||||
}) {
|
||||
const props = nodes.config || {}
|
||||
return (
|
||||
<span className={props?.className ?? ""}>
|
||||
{props?.label && <span>{props.label}</span>}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import VtDropdown from "@modules/layout/templates/vt-dropdown"
|
||||
import VtButton from "@modules/layout/templates/vt-button"
|
||||
import VtSearchInput from "@modules/layout/templates/vt-search-input"
|
||||
import VtSection from "@modules/layout/templates/vt-section"
|
||||
import VtText from "@modules/layout/templates/vt-text"
|
||||
|
||||
type ComponentConfig = Record<string, any>;
|
||||
|
||||
@@ -64,6 +65,7 @@ export const componentMap: Record<string, ComponentRenderer> = {
|
||||
VtCartButton: nodesContextRenderer(VtCartButton),
|
||||
Link: nodesContextRenderer(VtLink),
|
||||
Image: nodesContextRenderer(VtImage),
|
||||
Text: nodesContextRenderer(VtText),
|
||||
Dropdown: nodesContextRenderer(VtDropdown),
|
||||
CartMismatchBanner: configOnly(CartMismatchBanner),
|
||||
FreeShippingPriceNudge: configOnly(FreeShippingPriceNudge),
|
||||
|
||||
Reference in New Issue
Block a user