How to use the @patternfly/react-styles.css 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 / react-core / src / components / Alert / AlertIcon.js View on Github external
const AlertIcon = ({ variant, className, ...props }) => {
  const Icon = variantIcons[variant];
  return (
    <div>
      
    </div>
  );
};
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Alert / Alert.js View on Github external
...props
}) =&gt; {
  variantLabel = variantLabel || capitalize(AlertVariant[variant]);
  const readerTitle = (
    
      <span>{`${variantLabel} alert:`}</span>
      {title}
    
  );

  const customClassName = css(styles.alert, getModifier(styles, variant, styles.modifiers.info), className);

  return (
    <div aria-label="{ariaLabel}">
      
      <h4>{readerTitle}</h4>
      {children &amp;&amp; (
        <div>
          <p>{children}</p>
        </div>
      )}
      {action &amp;&amp; (
        <div>{React.cloneElement(action, { title, variantLabel })}</div>
      )}
    </div>
  );
};
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / LoginPage / LoginMainFooterBandItem.tsx View on Github external
export const LoginMainFooterBandItem: React.FunctionComponent = ({
  children = null,
  className = '',
  ...props
}: LoginMainFooterBandItemProps) =&gt; (
  <p>
    {children}
  </p>
);
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Select / CheckboxSelect.js View on Github external
render() {
    const { children, className, isExpanded, checked, isGrouped, ...props } = this.props;
    this.renderedChildren = this.extendChildren(props);
    return (
      
        <div>
          <form novalidate="">
            <div>{this.renderedChildren}</div>
          </form>
        </div>
      
    );
  }
}
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / AboutModal / AboutModalBoxContent.tsx View on Github external
export const AboutModalBoxContent: React.SFC = ({
  children,
  className = '',
  trademark,
  id,
  noAboutModalBoxContentContainer = false,
  ...props
}: AboutModalBoxContentProps) =&gt; (
  <div id="{id}">
    <div>
      {noAboutModalBoxContentContainer ? children : <div>{children}</div>}
    </div>
    <p>{trademark}</p>
  </div>
);
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Select / Select.tsx View on Github external
onClose={this.onClose}
            ariaLabelledBy={`${ariaLabelledBy || ''} ${selectToggleId}`}
            variant={variant}
            ariaLabelToggle={ariaLabelToggle}
            handleTypeaheadKeys={this.handleTypeaheadKeys}
            isDisabled={isDisabled}
          &gt;
            {customContent &amp;&amp; (
              <div>
                {toggleIcon &amp;&amp; <span>{toggleIcon}</span>}
                <span>{placeholderText}</span>
              </div>
            )}
            {variant === SelectVariant.single &amp;&amp; !customContent &amp;&amp; (
              <div>
                {toggleIcon &amp;&amp; <span>{toggleIcon}</span>}
                <span>
                  {this.getDisplay(selections as string, 'node') || placeholderText || childPlaceholderText}
                </span>
              </div>
            )}
            {variant === SelectVariant.checkbox &amp;&amp; !customContent &amp;&amp; (
              
                <div>
                  {toggleIcon &amp;&amp; <span>{toggleIcon}</span>}
                  <span>{placeholderText}</span>
                  {selections &amp;&amp; (Array.isArray(selections) &amp;&amp; selections.length &gt; 0) &amp;&amp; (
                    <div>
                      <span>{selections.length}</span>
                    </div>
                  )}
                </div>
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / EmptyState / EmptyStateSecondaryActions.js View on Github external
const EmptyStateSecondaryActions = ({ children, className, ...props }) =&gt; (
  <div>
    {children}
  </div>
);
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Tooltip / Tooltip.tsx View on Github external
exitDelay,
      appendTo,
      zIndex,
      maxWidth,
      isAppLauncher,
      distance,
      aria,
      boundary,
      flipBehavior,
      tippyProps,
      id,
      ...rest
    } = this.props;
    const content = (
      <div id="{id}" role="tooltip">
        {bodyContent}
      </div>
    );
    return (