-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #721 from joshunrau/v1.0
- Loading branch information
Showing
31 changed files
with
321 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
apps/web/src/components/ActiveVisit/ActiveVisit.stories.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
...re/src/components/Navbar/MobileSlider.tsx → ...eb/src/components/Layout/MobileSlider.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { cn } from '@douglasneuroinformatics/ui'; | ||
|
||
export type NavButtonProps = { | ||
[key: `data-${string}`]: unknown; | ||
activeClassName?: string; | ||
className?: string; | ||
disabled?: boolean; | ||
icon?: React.ComponentType<Omit<React.SVGProps<SVGSVGElement>, 'ref'>>; | ||
isActive: boolean; | ||
label: string; | ||
onClick?: () => void; | ||
variant: 'horizontal' | 'vertical'; | ||
}; | ||
|
||
export const NavButton = ({ | ||
activeClassName, | ||
className, | ||
icon: Icon, | ||
isActive, | ||
label, | ||
variant, | ||
...props | ||
}: NavButtonProps) => { | ||
return ( | ||
<button | ||
className={cn( | ||
'flex w-full items-center p-2 text-slate-700 hover:text-slate-900 disabled:opacity-75 disabled:hover:cursor-not-allowed dark:text-slate-300 dark:hover:text-slate-100', | ||
{ | ||
'justify-start': variant === 'vertical', | ||
'mx-1 justify-center': variant === 'horizontal' | ||
}, | ||
className, | ||
isActive && (activeClassName ?? 'text-slate-900 dark:text-slate-100') | ||
)} | ||
type="button" | ||
{...props} | ||
> | ||
{Icon && ( | ||
<Icon | ||
className={cn('mr-2', { | ||
hidden: variant === 'horizontal' | ||
})} | ||
height={16} | ||
width={16} | ||
/> | ||
)} | ||
{label} | ||
</button> | ||
); | ||
}; |
Oops, something went wrong.