update git commit and push
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Menu as MenuIcon } from "lucide-react";
|
||||
import { imageField } from "@reacteditor/plugin-media/field";
|
||||
import { Navigation, type NavigationProps } from "@/components/navigation/navigation";
|
||||
import { frontendAiMediaAdapter } from "@/services/media-adapter";
|
||||
|
||||
export const navigationEditor: ComponentConfig<NavigationProps> = {
|
||||
label: "Navigation",
|
||||
@@ -9,6 +11,7 @@ export const navigationEditor: ComponentConfig<NavigationProps> = {
|
||||
global: true,
|
||||
defaultProps: {
|
||||
brand: "Maison",
|
||||
logo: "",
|
||||
links: [
|
||||
{ label: "Shop", href: "/collections" },
|
||||
{ label: "Lookbook", href: "/lookbook" },
|
||||
@@ -24,6 +27,7 @@ export const navigationEditor: ComponentConfig<NavigationProps> = {
|
||||
},
|
||||
fields: {
|
||||
brand: { label: "Brand", type: "text", contentEditable: true },
|
||||
logo: { label: "Logo", ...imageField({ adapter: frontendAiMediaAdapter }) },
|
||||
links: {
|
||||
label: "Links",
|
||||
type: "array",
|
||||
|
||||
@@ -7,6 +7,7 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
export type NavigationProps = {
|
||||
brand: string;
|
||||
logo?: string;
|
||||
links: Array<{ label: string; href: string }>;
|
||||
showSearch: "yes" | "no";
|
||||
showCart: "yes" | "no";
|
||||
@@ -18,6 +19,7 @@ export type NavigationProps = {
|
||||
|
||||
export function Navigation({
|
||||
brand,
|
||||
logo,
|
||||
links,
|
||||
showSearch,
|
||||
showCart,
|
||||
@@ -70,10 +72,18 @@ export function Navigation({
|
||||
<div className="container mx-auto flex h-16 max-w-7xl items-center justify-between px-6 md:h-20">
|
||||
<Link
|
||||
to="/"
|
||||
className="font-semibold tracking-tight"
|
||||
className="inline-flex items-center font-semibold tracking-tight"
|
||||
style={{ fontSize: "1.125rem", letterSpacing: "0.02em" }}
|
||||
>
|
||||
{brand}
|
||||
{logo ? (
|
||||
<img
|
||||
src={logo}
|
||||
alt={brand || "Brand Logo"}
|
||||
className="h-8 w-auto object-contain"
|
||||
/>
|
||||
) : (
|
||||
brand || "Brand Logo"
|
||||
)}
|
||||
</Link>
|
||||
|
||||
<nav className="hidden items-center gap-8 md:flex">
|
||||
|
||||
Reference in New Issue
Block a user