Skip to content

Commit

Permalink
fix: add label to administrator menu button and fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
seandreassen committed Oct 30, 2024
1 parent 7d6bdc5 commit 131cd2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/[locale]/(default)/shift-schedule/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export default async function ShiftSchedulePage({
return (
<>
<AdministratorMenu
messages = {{
messages={{
administratorMenu: t('administratorMenu.administratorMenu'),
clearShiftSchedule: t('administratorMenu.clearShiftSchedule')
clearShiftSchedule: t('administratorMenu.clearShiftSchedule'),
}}
/>
<ScheduleTable week={shiftScheduleMockData} />
Expand Down
13 changes: 9 additions & 4 deletions src/components/shift-schedule/AdministratorMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/Collapsible';
import { Separator } from '@/components/ui/Separator';
import { ChevronDownIcon, ChevronUpIcon, Trash2Icon } from 'lucide-react';
import { useState } from 'react';

Expand All @@ -24,7 +23,7 @@ function AdministratorMenu({ messages }: AdministratorMenuProps) {
<Collapsible
open={isOpen}
onOpenChange={setIsOpen}
className='data-[state] mx-auto xs:mx-8 my-8 rounded border p-3'
className='mx-auto xs:mx-8 my-8 rounded border p-3'
>
<section className='mx-1 flex justify-between'>
<span className='my-auto font-semibold text-xl'>
Expand All @@ -33,9 +32,15 @@ function AdministratorMenu({ messages }: AdministratorMenuProps) {
<CollapsibleTrigger asChild>
<Button variant='ghost'>
{isOpen ? (
<ChevronUpIcon className='size-4' />
<ChevronUpIcon
aria-label='Close Administrator Menu'
className='size-4'
/>
) : (
<ChevronDownIcon className='size-4' />
<ChevronDownIcon
aria-label='Open Administrator Menu'
className='size-4'
/>
)}
</Button>
</CollapsibleTrigger>
Expand Down

0 comments on commit 131cd2f

Please sign in to comment.