Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
isHovered,
isActive,
isFocused,
'aria-label': ariaLabel
}) => (
<div>
<span>{toggleText}</span>
<button aria-expanded="{isOpen}" aria-label="{ariaLabel}" aria-haspopup="listbox" id="{`${parentId}-toggle`}">
{toggleButtonContents}
</button>
</div>
);
className={css(
styles.optionsMenuToggle,
isPlain && getModifier(styles, 'plain'),
isHovered && getModifier(styles, 'hover'),
isActive && getModifier(styles, 'active'),
isFocused && getModifier(styles, 'focus')
)}
id={`${parentId}-toggle`}
aria-haspopup="listbox"
aria-label={ariaLabel}
aria-expanded={isOpen}
onClick={onToggle}
>
{ToggleTemplate &&
(!isPlain ? (
<span>{template}</span>
) : (
{template}
))}
{!hideCaret && }
);
};