From d8a18f2744d80d4cb2a48830974f8ded30d6cdfd Mon Sep 17 00:00:00 2001 From: Rodolfo Ruiz Date: Wed, 14 May 2025 20:07:36 -0600 Subject: [PATCH] feat: add the header --- src/App.jsx | 9 ++++-- src/components/AppHeader.jsx | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 src/components/AppHeader.jsx diff --git a/src/App.jsx b/src/App.jsx index d43415f..cc5a2f2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -6,6 +6,7 @@ import AppBar from '@mui/material/AppBar'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import IconButton from '@mui/material/IconButton'; +import AppHeader from './components/AppHeader'; import './App.css' @@ -17,17 +18,19 @@ function App() { - + + + {/* Fendi logo - Fendi Home Experience + Fendi Casa Experience - + */} ) diff --git a/src/components/AppHeader.jsx b/src/components/AppHeader.jsx new file mode 100644 index 0000000..ac2e259 --- /dev/null +++ b/src/components/AppHeader.jsx @@ -0,0 +1,55 @@ +import fendiLogo from '/favicon.png' +import { AppBar, Toolbar, Typography, InputBase, IconButton, Box } from '@mui/material'; +import SearchIcon from '@mui/icons-material/Search'; + +export default function AppHeader({ zone = 'public' }) { + const isPrivate = zone === 'private'; + const isRestricted = zone === 'restricted'; + const isPublic = zone === 'public'; + + return ( + + + + + Fendi logo + + + {isPrivate ? "Private" : isRestricted ? "Restricted" : "Fendi Casa Experience"} + + + + {/* Search only visible for restricted or private zones */} + {(isRestricted || isPrivate || isPublic) && ( + + + + + )} + + {/* Login button only visible for public zone */} + {isPublic && ( + + + + Login + + + + )} + + + + ); +} \ No newline at end of file