How to use the @patternfly/patternfly/components/OptionsMenu/options-menu.css.optionsMenuToggle function in @patternfly/patternfly

To help you get started, we’ve selected a few @patternfly/patternfly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / OptionsMenu / OptionsMenuToggle.js View on Github external
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 &amp;&amp;
        (!isPlain ? (
          <span>{template}</span>
        ) : (
          {template}</button>
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / OptionsMenu / OptionsMenuToggleWithText.js View on Github external
parentId,
  toggleText,
  toggleTextClassName,
  toggleButtonContents,
  toggleButtonContentsClassName,
  onToggle,
  isOpen,
  isPlain,
  isHovered,
  isActive,
  isFocused,
  'aria-label': ariaLabel
}) =&gt; (
  <div>
    <span>{toggleText}</span>
    <button aria-expanded="{isOpen}" aria-label="{ariaLabel}" aria-haspopup="listbox" id="{`${parentId}-toggle`}"></button></div>