How to use the @patternfly/react-styles/css/components/Dropdown/dropdown.modifiers function in @patternfly/react-styles

To help you get started, we’ve selected a few @patternfly/react-styles 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 / Dropdown / Toggle.tsx View on Github external
{({ toggleClass }) => (
          <button type="{type" id="{id}"> onToggle(!isOpen, event)}
            aria-expanded={isOpen}
            aria-haspopup={ariaHasPopup}
            onKeyDown={event =&gt; this.onKeyDown(event)}
            disabled={isDisabled}
          &gt;
            {children}
          </button>
        )}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / DropdownToggle.js View on Github external
const DropdownToggle = ({ children, iconComponent: IconComponent, splitButtonItems, ...props }) =&gt; {
  const toggle = (
    
      {children &amp;&amp; <span>{children}</span>}
      {IconComponent &amp;&amp; }
    
  );

  if (splitButtonItems) {
    return (
      <div>
        {splitButtonItems}
        {toggle}
      </div>
    );
  }

  return toggle;
};
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / DropdownWithContext.tsx View on Github external
{({ baseClass, baseComponent, id: contextId }) =&gt; {
          const BaseComponent = baseComponent as any;
          return (
            
              {React.Children.map(toggle, oneToggle =&gt;
                React.cloneElement(oneToggle, {
                  parentRef: this.baseComponentRef,
                  isOpen,
                  id,
                  isPlain,
                  ariaHasPopup,
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / Dropdown.tsx View on Github external
}: DropdownProps) =&gt; (
   onSelect &amp;&amp; onSelect(event),
      toggleTextClass: styles.dropdownToggleText,
      toggleIconClass: styles.dropdownToggleIcon,
      menuClass: styles.dropdownMenu,
      itemClass: styles.dropdownMenuItem,
      toggleClass: styles.dropdownToggle,
      baseClass: styles.dropdown,
      baseComponent: 'div',
      sectionClass: styles.dropdownGroup,
      sectionTitleClass: styles.dropdownGroupTitle,
      sectionComponent: 'section',
      disabledClass: styles.modifiers.disabled,
      hoverClass: styles.modifiers.hover,
      separatorClass: styles.dropdownSeparator
    }}
  &gt;
    
  
);
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / DropdownWithContext.tsx View on Github external
{({ baseClass, baseComponent, id: contextId }) =&gt; {
          const BaseComponent = baseComponent as any;
          return (
            
              {React.Children.map(toggle, oneToggle =&gt;
                React.cloneElement(oneToggle, {
                  parentRef: this.baseComponentRef,
                  isOpen,
                  id,
                  isPlain,
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / InternalDropdownItem.tsx View on Github external
&gt;
              {renderWithTooltip(
                isComponentReactElement ? (
                  React.cloneElement(Component as React.ReactHTMLElement, {
                    ...additionalProps,
                    className: css(classes, itemClass, variant === 'icon' &amp;&amp; styles.modifiers.icon)
                  })
                ) : (
                  
                    {children}
                  
                )
              )}
              {additionalChild &amp;&amp; this.extendAdditionalChildRef()}
            
          );
        }}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / DropdownToggle.tsx View on Github external
&gt;
          {children &amp;&amp; <span>{children}</span>}
          {IconComponent &amp;&amp; }
        
      )}
    
  );

  if (splitButtonItems) {
    return (
      <div>
        {splitButtonItems}
        {toggle}
      </div>
    );
  }

  return toggle;
};
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / Toggle.tsx View on Github external
{({ toggleClass }) =&gt; (
          <button type="{type" id="{id}"> onToggle(!isOpen, event)}
            aria-expanded={isOpen}
            aria-haspopup={ariaHasPopup}
            onKeyDown={event =&gt; this.onKeyDown(event)}
            disabled={isDisabled}
          &gt;
            {children}
          </button>
        )}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Dropdown / DropdownMenu.tsx View on Github external
{({ onSelect, menuClass }) =&gt; (
              <div hidden="{!isOpen}"> onSelect &amp;&amp; onSelect(event)}
              &gt;
                {children}
              </div>
            )}