+ took out extra 'layout' directory. + 'Canvas' postfix removed from all files in the views directory. + "WidgetCanvas" renamed to "MyDashboard"
33 lines
1018 B
React
33 lines
1018 B
React
import { chakra, useRecipe, Box, Button, Stack, Text, Flex } from "@chakra-ui/react"
|
|
import UserAvatarMenu from "./UserAvatarMenu.jsx";
|
|
|
|
//TODO: Dynamically populate per each user
|
|
const user = {
|
|
name: "venessa kuchenik",
|
|
email: "vkuchenik@contractor.usgs.gov",
|
|
// avatar: "src\\assets\\user_profile.svg"
|
|
}
|
|
|
|
export default function Header({ onChangeView }) {
|
|
const recipe = useRecipe({ key: "header" });
|
|
const styles = recipe();
|
|
|
|
return (
|
|
<chakra.div css={styles}>
|
|
<Button color="color" variant="plain" textStyle="5xl" fontWeight="bold">VDAP</Button>
|
|
<Flex align="center" gap={3} pr={6}>
|
|
<Stack gap="0" textAlign="center" cursor="default">
|
|
<Text color="color" fontWeight="bold" textStyle="lg">{user.name}</Text>
|
|
<Text color="fg.muted" textStyle="sm">{user.email}</Text>
|
|
</Stack>
|
|
<UserAvatarMenu
|
|
name={user.name}
|
|
avatar={user.avatar}
|
|
onChangeView={ onChangeView }
|
|
/>
|
|
</Flex>
|
|
</chakra.div>
|
|
);
|
|
}
|
|
|