Skip to content

Commit

Permalink
refactor: move aria label and remove unnecessary span
Browse files Browse the repository at this point in the history
  • Loading branch information
seandreassen committed Nov 7, 2024
1 parent 0118dd1 commit 08d0705
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/shift-schedule/AdministratorMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ function AdministratorMenu({ t }: AdministratorMenuProps) {
<div className='mx-1 flex justify-between'>
<span className='my-auto font-semibold text-xl'>{t.label}</span>
<CollapsibleTrigger asChild>
<Button variant='ghost'>
<Button variant='ghost' aria-label={isOpen ? t.close : t.open}>
{isOpen ? (
<ChevronUpIcon aria-label={t.close} className='size-4' />
<ChevronUpIcon aria-hidden='true' className='size-4' />
) : (
<ChevronDownIcon aria-label={t.open} className='size-4' />
<ChevronDownIcon aria-hidden='true' className='size-4' />
)}
</Button>
</CollapsibleTrigger>
</div>
<CollapsibleContent className='mt-2'>
<Button variant='link' className='flex gap-3 text-destructive'>
<Trash2Icon />
<span>{t.clearShiftSchedule}</span>
{t.clearShiftSchedule}
</Button>
</CollapsibleContent>
</Collapsible>
Expand Down

0 comments on commit 08d0705

Please sign in to comment.