How to use the @patternfly/patternfly/components/Alert/alert.css.alertTitle 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 / Alert / AlertBody.js View on Github external
const AlertBody = ({ title, className, children, onClose, closeButtonAriaLabel, ...props }) => (
  <div>
    {onClose &amp;&amp; (
      <button aria-label="{closeButtonAriaLabel}">
        
      </button>
    )}
    {title &amp;&amp; <h4>{title}</h4>}
    {children &amp;&amp; <p>{children}</p>}
  </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>
  );
};