From ccc458903390b326c2e96134a639f97664ed8cb3 Mon Sep 17 00:00:00 2001 From: Eric Lewis Date: Mon, 26 Feb 2024 17:45:04 -0500 Subject: [PATCH] partial sidebar style --- packages/frontend/public/logo.svg | 1 + packages/frontend/src/components/Sidebar.tsx | 103 ++++++++++++------ .../src/components/shared/Tabs/Tabs.theme.ts | 6 + 3 files changed, 74 insertions(+), 36 deletions(-) create mode 100644 packages/frontend/public/logo.svg diff --git a/packages/frontend/public/logo.svg b/packages/frontend/public/logo.svg new file mode 100644 index 00000000..3781af8a --- /dev/null +++ b/packages/frontend/public/logo.svg @@ -0,0 +1 @@ + diff --git a/packages/frontend/src/components/Sidebar.tsx b/packages/frontend/src/components/Sidebar.tsx index 18f823b1..d8df365b 100644 --- a/packages/frontend/src/components/Sidebar.tsx +++ b/packages/frontend/src/components/Sidebar.tsx @@ -2,11 +2,13 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Link, NavLink, useNavigate, useParams } from 'react-router-dom'; import { Organization } from 'gql-client'; -import { Typography, Option } from '@material-tailwind/react'; +import { Option } from '@material-tailwind/react'; import { useDisconnect } from 'wagmi'; import { useGQLClient } from '../context/GQLClientContext'; import AsyncSelect from './shared/AsyncSelect'; +import { ChevronGrabberHorizontal, GlobeIcon } from './shared/CustomIcon'; +import { Tabs } from 'components/shared/Tabs'; const Sidebar = () => { const { orgSlug } = useParams(); @@ -33,61 +35,90 @@ const Sidebar = () => { }, [disconnect, navigate]); return ( -
+
-
- -

Snowball

- -
+ +
+ Snowball Logo + + Snowball + +
+ { setSelectedOrgSlug(value!); navigate(`/${value}`); }} selected={(_, index) => ( -
-
^
+
+ Application Logo
- {organizations[index!]?.name} - Organization +
+ {organizations[index!]?.name} +
+
Organization
)} + arrow={} > {/* TODO: Show label organization and manage in option */} {organizations.map((org) => ( ))} -
- (isActive ? 'text-blue-500' : '')} - > - Projects - -
-
- (isActive ? 'text-blue-500' : '')} - > - Settings - -
+ + + {['Projects', 'Settings'].slice(0, 2).map((title, index) => ( + + } value={title}> + {title} + + + ))} + +
-
- - Log Out - - Documentation - Support +
+ + {/* TODO: use proper link buttons */} + + } value=""> + + Log Out + + + } value=""> + Documentation + + } value=""> + Support + + +
); diff --git a/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts b/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts index 7c39b077..808a0b7f 100644 --- a/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts +++ b/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts @@ -38,6 +38,12 @@ export const tabsTheme = tv({ 'data-[orientation=vertical]:data-[state=active]:border-transparent', 'data-[orientation=vertical]:data-[state=active]:hover:text-elements-high-em', 'data-[orientation=vertical]:data-[state=active]:focus-visible:text-elements-high-em', + // TODO: demo additions + 'data-[orientation=vertical]:data-[state=active]:bg-snowball-200', + 'data-[orientation=vertical]:data-[state=active]:hover:bg-snowball-200', + 'data-[orientation=vertical]:data-[state=active]:text-snowball-800', + 'data-[orientation=vertical]:data-[state=active]:hover:text-snowball-800', + 'data-[orientation=vertical]:data-[state=active]:shadow-[0px_1px_0px_0px_rgba(8,47,86,0.06)_inset]', ], trigger: [ 'flex',