diff --git a/components/topbar/src/application-drawer.styles.ts b/components/topbar/src/application-drawer.styles.ts index d704cc2b..536c369d 100644 --- a/components/topbar/src/application-drawer.styles.ts +++ b/components/topbar/src/application-drawer.styles.ts @@ -1,21 +1,40 @@ import { makeStyles, shorthands, tokens } from "@fluentui/react-components"; export const useApplicationDrawrStyles = makeStyles({ + drawer: { + ...shorthands.borderRight(0), + }, header: { display: "flex", flexDirection: "row", justifyContent: "space-between", - backgroundColor: tokens.colorNeutralBackground5, + backgroundColor: tokens.colorNeutralBackground3, color: tokens.colorNeutralForeground3, ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalM), }, + body: { + backgroundColor: tokens.colorNeutralBackground2, + backgroundImage: "none", + }, headerTitle: { display: "flex", flexDirection: "row", alignItems: "center", ...shorthands.gap(tokens.spacingHorizontalS), }, - iconAndText: { + drawerTriggerButton: { + paddingLeft: "0px", + paddingTop: "0px", + paddingBottom: "0px", + ...shorthands.borderWidth(0), + ...shorthands.borderRadius( + tokens.borderRadiusXLarge, + tokens.borderRadiusLarge, + tokens.borderRadiusLarge, + tokens.borderRadiusXLarge + ), + }, + drawerTriggerApplication: { fontSize: "1.8em", display: "flex", flexDirection: "row", @@ -23,29 +42,50 @@ export const useApplicationDrawrStyles = makeStyles({ ...shorthands.gap(tokens.spacingHorizontalS), ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalM), }, + drawerTriggerApplicationIcon: { + color: tokens.colorNeutralForeground3, + "&:hover": { + color: tokens.colorNeutralForeground2BrandHover, + }, + }, + drawerTriggerApplicationIconHovered: { + color: tokens.colorNeutralForeground2BrandHover, + }, + drawerTriggerApplicationText: { + color: tokens.colorNeutralForeground3, + }, + applicationGroupTitle: { + fontSize: "1.4em", + display: "flex", + flexDirection: "row", + alignItems: "center", + ...shorthands.gap(tokens.spacingHorizontalS), + ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalS), + }, applicationGroupTitleIcon: { color: tokens.colorNeutralForeground2, }, applicationGroupTitleText: { color: tokens.colorNeutralForeground4, }, - currentSpplicationGroupTitleIcon: { - color: tokens.colorNeutralForeground3, - }, - currentApplicationGroupTitleText: { - color: tokens.colorNeutralForeground3, - }, applicationButton: { paddingLeft: tokens.spacingHorizontalXXS, }, content: { display: "flex", flexDirection: "column", - alignItems: "flex-start", width: "100%", - ...shorthands.gap(tokens.spacingVerticalM), + ...shorthands.gap(tokens.spacingVerticalS), paddingTop: tokens.spacingVerticalXXXL, }, + contentGroup: { + display: "flex", + flexDirection: "column", + width: "100%", + }, + contentDivider: { + paddingTop: tokens.spacingVerticalS, + }, contentChildren: { display: "flex", flexDirection: "column", @@ -57,9 +97,7 @@ export const useApplicationDrawrStyles = makeStyles({ contentButton: { width: "100%", justifyContent: "flex-start", - }, - selectedContentButton: { - backgroundColor: tokens.colorNeutralBackground2Hover, + paddingLeft: tokens.spacingHorizontalSNudge, }, linkWrapper: { display: "flex", diff --git a/components/topbar/src/application-drawer.tsx b/components/topbar/src/application-drawer.tsx index b8128470..6cc2e6c5 100644 --- a/components/topbar/src/application-drawer.tsx +++ b/components/topbar/src/application-drawer.tsx @@ -1,6 +1,5 @@ import { ArrowRightRegular, Dismiss20Regular } from "@fluentui/react-icons"; -import React, { Fragment, useState } from "react"; - +import React, { useState } from "react"; import { ApplicationArea } from "./top-bar.types"; import { useTranslation } from "./translation-context"; import { @@ -14,6 +13,7 @@ import { DrawerHeader, Link, mergeClasses, + ToggleButton, tokens, } from "@fluentui/react-components"; import { useApplicationDrawrStyles as useApplicationDrawerStyles } from "./application-drawer.styles"; @@ -29,22 +29,47 @@ import { } from "./application-drawer.types"; import { useApplicationStyles } from "./application.styles"; -const CurrentApplication = ({ application }: { - application: SingleApplicationDrawerContent; -}): JSX.Element => { +const DrawerTrigger = ( + { setIsOpen, applicationArea, currentSelection }: { + setIsOpen: (isOpen: boolean) => void; + applicationArea: ApplicationArea; + currentSelection: SingleApplicationDrawerContent | undefined; + } +) => { const styles = useApplicationDrawerStyles(); + const [hover, setHover] = useState(false); return ( -