2025-07-17 11:03:55 -07:00
|
|
|
import { chakra, useRecipe, Box, Button, Avatar, Stack, Text, Menu, Portal, Flex } from "@chakra-ui/react"
|
2025-07-16 15:02:57 -07:00
|
|
|
|
|
|
|
|
export default function Header() {
|
|
|
|
|
const recipe = useRecipe({ key: "header" });
|
|
|
|
|
const styles = recipe();
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<chakra.div css={styles}>
|
|
|
|
|
<Button color="color" variant="plain" textStyle="5xl" fontWeight="bold">VDAP</Button>
|
2025-07-17 11:03:55 -07:00
|
|
|
<Flex align="center" gap={3} pr={6}>
|
|
|
|
|
<Stack gap="0" textAlign="right">
|
|
|
|
|
<Text color="color" fontWeight="bold" textStyle="lg">{user.name}</Text>
|
|
|
|
|
<Text color="fg.muted" textStyle="sm">{user.email}</Text>
|
|
|
|
|
</Stack>
|
|
|
|
|
|
|
|
|
|
{/* Add a drop down menu to the avatar */}
|
|
|
|
|
<Menu.Root>
|
|
|
|
|
<Menu.Trigger rounded="full" focusRing="outside">
|
|
|
|
|
<Avatar.Root>
|
|
|
|
|
<Avatar.Fallback name={user.name} />
|
|
|
|
|
<Avatar.Image src={user.avatar} />
|
|
|
|
|
</Avatar.Root>
|
|
|
|
|
</Menu.Trigger>
|
|
|
|
|
<Portal>
|
|
|
|
|
<Menu.Positioner zIndex="popover">
|
|
|
|
|
<Menu.Content>
|
|
|
|
|
<Menu.Item value="account">Account</Menu.Item>
|
|
|
|
|
<Menu.Item value="settings">Settings</Menu.Item>
|
|
|
|
|
<Menu.Item value="logout">Logout</Menu.Item>
|
|
|
|
|
</Menu.Content>
|
|
|
|
|
</Menu.Positioner>
|
|
|
|
|
</Portal>
|
|
|
|
|
</Menu.Root>
|
|
|
|
|
{/* End drop down menu */}
|
|
|
|
|
</Flex>
|
2025-07-16 15:02:57 -07:00
|
|
|
</chakra.div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const user = {
|
|
|
|
|
name: "venessa kuchenik",
|
|
|
|
|
email: "vkuchenik@contractor.usgs.gov",
|
|
|
|
|
// avatar: "src\\assets\\user_profile.svg"
|
|
|
|
|
}
|