How to use the @patternfly/react-styles/css/components/Button/button.button 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-table / src / components / Table / utils / decorators / sortable.tsx View on Github external
} else {
      reversedDirection = sortBy.direction === SortByDirection.asc ? SortByDirection.desc : SortByDirection.asc;
    }
    // tslint:disable-next-line:no-unused-expression
    onSort && onSort(event, columnIndex, reversedDirection, extraData);
  }

  return {
    className: css(styles.tableSort, isSortedBy && styles.modifiers.selected),
    'aria-sort': isSortedBy ? `${sortBy.direction}ending` : 'none',
    children: (
      
        {label}
      
    )
  };
};
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Select / Select.tsx View on Github external
value={
                      typeaheadInputValue !== null
                        ? typeaheadInputValue
                        : this.getDisplay(selections as string, 'text') || ''
                    }
                    type="text"
                    onClick={this.onClick}
                    onChange={this.onChange}
                    onFocus={this.handleFocus}
                    autoComplete="off"
                    disabled={isDisabled}
                  />
                
                {selections && (
                  <button> {
                      this.clearSelection(e);
                      onClear(e);
                    }}
                    aria-label={ariaLabelClear}
                    type="button"
                    disabled={isDisabled}
                  &gt;
                    
                  </button>
                )}
              
            )}
            {variant === SelectVariant.typeaheadMulti &amp;&amp; !customContent &amp;&amp; (
              
                <div></div>
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / experimental / components / Button / Button.tsx View on Github external
icon = null,
  render = true,
  ...props
}: ButtonProps) =&gt; {
  if (!render) {
    return <p>no render</p>;
  }
  const Component = component as any;
  const isButtonElement = Component === 'button';
  return (
    
      {(icon &amp;&amp; variant === 'link') &amp;&amp; <span>{icon}</span>}
      {children}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / ApplicationLauncher / ApplicationLauncherToggle.tsx View on Github external
isHovered,
      isPlain,
      onToggle,
      onEnter,
      parentRef,
      id,
      type,
      ...props
    } = this.props;
    return (
      <button type="{(type" id="{id}"> onToggle &amp;&amp; onToggle(!isOpen)}
        aria-expanded={isOpen}
        onKeyDown={this.onKeyDown}
      &gt;
        {children}
      </button>
    );
  }
}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Select / SelectToggle.tsx View on Github external
isDisabled &amp;&amp; styles.modifiers.disabled,
              isPlain &amp;&amp; styles.modifiers.plain,
              isTypeahead &amp;&amp; styles.modifiers.typeahead,
              className
            )}
            onClick={_event =&gt; {
              if (!isDisabled) {
                onToggle(true);
              }
            }}
            onKeyDown={this.onKeyDown}
          &gt;
            {children}
            <button aria-label="{ariaLabelToggle}"> {
                _event.stopPropagation();
                onToggle(!isExpanded);
                if (isExpanded) {
                  onClose();
                }
              }}
              disabled={isDisabled}
            &gt;
              
            </button>
          
        )}
      
    );
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / SkipToContent / SkipToContent.tsx View on Github external
render() {
    const { component, children, className, href, show, ...rest } = this.props;
    const Component = component;
    return (
      
        {children}
      
    );
  }
}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Select / Select.tsx View on Github external
aria-activedescendant={typeaheadActiveChild &amp;&amp; typeaheadActiveChild.id}
                    id="select-multi-typeahead-typeahead"
                    aria-label={ariaLabelTypeAhead}
                    placeholder={placeholderText as string}
                    value={typeaheadInputValue !== null ? typeaheadInputValue : ''}
                    type="text"
                    onChange={this.onChange}
                    onClick={this.onClick}
                    onFocus={this.handleFocus}
                    autoComplete="off"
                    disabled={isDisabled}
                  /&gt;
                
                {selections &amp;&amp; (Array.isArray(selections) &amp;&amp; selections.length &gt; 0) &amp;&amp; (
                  <button> {
                      this.clearSelection(e);
                      onClear(e);
                    }}
                    aria-label={ariaLabelClear}
                    type="button"
                    disabled={isDisabled}
                  &gt;
                    
                  </button>
                )}
              
            )}
          
          {customContent &amp;&amp; isExpanded &amp;&amp; (
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Button / Button.tsx View on Github external
'aria-label': ariaLabel = null,
  icon = null,
  ouiaContext = null,
  ouiaId = null,
  tabIndex = null as number,
  ...props
}: ButtonProps &amp; InjectedOuiaProps) =&gt; {
  const Component = component as any;
  const isButtonElement = Component === 'button';
  return (