Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hideCaret,
'aria-label': ariaLabel,
toggleTemplate: ToggleTemplate,
toggleTemplateProps
}) => {
const template =
ToggleTemplate && typeof ToggleTemplate === 'string' ? (
fillTemplate(ToggleTemplate, toggleTemplateProps)
) : (
);
return (
<button aria-expanded="{isOpen}" aria-label="{ariaLabel}" aria-haspopup="listbox" id="{`${parentId}-toggle`}">
{ToggleTemplate &&
(!isPlain ? (
<span>{template}</span>
) : (
{template}</button>
parentId,
toggleText,
toggleTextClassName,
toggleButtonContents,
toggleButtonContentsClassName,
onToggle,
isOpen,
isPlain,
isHovered,
isActive,
isFocused,
'aria-label': ariaLabel
}) => (
<div>
<span>{toggleText}</span>
<button aria-expanded="{isOpen}" aria-label="{ariaLabel}" aria-haspopup="listbox" id="{`${parentId}-toggle`}"></button></div>