Skip to content

Commit

Permalink
fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
zkirby committed Dec 5, 2023
1 parent 2021bb0 commit 94269cc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
4 changes: 3 additions & 1 deletion apps/nextjs/src/app/_components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ import React, { Fragment } from 'react';
const Dropdown = ({
children,
OpenButton,
openButtonClass,
position = 'left',
size = 'md',
noHighlight = false,
}: {
children: ReactElement | ReactNode[];
OpenButton: ReactElement;
openButtonClass?: string;
position?: 'left' | 'right';
size?: 'sm' | 'md' | 'lg';
noHighlight?: boolean;
}) => {
return (
<Menu as="div" className="relative inline-block">
<Menu.Button>{OpenButton}</Menu.Button>
<Menu.Button className={openButtonClass}>{OpenButton}</Menu.Button>

<Transition
as={Fragment}
Expand Down
12 changes: 8 additions & 4 deletions apps/nextjs/src/app/_components/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const SideNav = ({ children }: { children: ReactNode }) => {
<div className="flex">
<div className="bg-light-grey relative left-0 top-0 flex h-screen w-[220px] flex-col justify-between border-r-[1px] border-zinc-200 px-3 text-black">
<div>
<div className="flex items-center justify-between px-2 py-3">
<div className="text-xs flex">
<div className="flex items-center justify-between py-3 pl-2">
<div className="text-sm flex">
<Image
src="/vessel-icon.svg"
width={18}
Expand All @@ -66,7 +66,11 @@ const SideNav = ({ children }: { children: ReactNode }) => {
/>
Vessel
</div>
<Dropdown position="right" OpenButton={<UserIcon {...user} />}>
<Dropdown
position="right"
OpenButton={<UserIcon {...user} />}
openButtonClass="flex"
>
{/* TODO(@zkirby): Enable dark mode */}
{/* <Switch
checked={darkMode}
Expand All @@ -84,7 +88,7 @@ const SideNav = ({ children }: { children: ReactNode }) => {
<SignOutButton className={'w-full text-left text-red-400'} />
</Dropdown>
</div>
<div className="mt-2">
<div className="mt-3">
<NavItem
route="/alerts"
title="Alerts"
Expand Down
16 changes: 9 additions & 7 deletions apps/nextjs/src/app/_components/UserIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ const UserIcon = ({
);
} else if (imageUrl) {
return (
<Image
className="flex items-center justify-center rounded-full bg-slate-500 text-slate-200 h-[20px] w-[20px] text-xxs object-cover border-2 border-white"
src={imageUrl}
alt={'user profile picture'}
width={20}
height={20}
/>
<div>
<Image
className="rounded-full bg-slate-500 text-slate-200 h-[23px] w-[23px] text-xxs object-cover border-2 border-white"
src={imageUrl}
alt={'user profile picture'}
width={25}
height={25}
/>
</div>
);
}
return (
Expand Down
7 changes: 4 additions & 3 deletions apps/nextjs/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ export default {
},
/**
* @Guidelines - Lean smaller, more compact sizes.
* @NOTE - xxxs, xxs, and xs have been bumped by 1px each.
*/
fontSize: {
xxxs: '4px',
xxs: '8px',
xs: '12px',
xxxs: '5px',
xxs: '9px',
xs: '13px',
sm: '14px',
base: '16px',
lg: '18px',
Expand Down

0 comments on commit 94269cc

Please sign in to comment.