Skip to content

Commit ac93a9f

Browse files
committed
[#102] ♻️ isOpon state controles aria-expanded of dropdown trigger
1 parent 11396d8 commit ac93a9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/common/dropdown/Dropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ const Dropdown = ({ children, className }: BaseProps): JSX.Element => {
5959
}
6060

6161
const Trigger = ({ children, className }: BaseProps) => {
62-
const { toggle } = useDropdownContext()
62+
const { isOpen, toggle } = useDropdownContext()
6363

6464
return (
6565
<button
6666
type='button'
6767
className={className}
6868
onClick={toggle}
6969
aria-haspopup='listbox'
70-
aria-expanded={true}
70+
aria-expanded={isOpen}
7171
>
7272
{children}
7373
</button>

0 commit comments

Comments
 (0)