Skip to content

Commit

Permalink
Replace ToggleDescribedBy component with inlined
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Oct 12, 2023
1 parent 591d61a commit 634864f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,6 @@ const BorderControlDropdown = (
? 'bottom left'
: undefined;

const ToggleDescribedBy = () => (
<VisuallyHidden id={ toggleDescriptionId }>
{ toggleDescription }
</VisuallyHidden>
);

const renderToggle: DropdownComponentProps[ 'renderToggle' ] = ( {
onToggle,
} ) => (
Expand Down Expand Up @@ -264,7 +258,9 @@ const BorderControlDropdown = (

return (
<>
<ToggleDescribedBy />
<VisuallyHidden id={ toggleDescriptionId }>
{ toggleDescription }
</VisuallyHidden>
<Dropdown
renderToggle={ renderToggle }
renderContent={ renderContent }
Expand Down

0 comments on commit 634864f

Please sign in to comment.