Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 936 Bytes

File metadata and controls

34 lines (27 loc) · 936 Bytes

@patternfly/react-styles

Library that provides CSS-in-JS capabilities

Example

import { css } from '@patternfly/react-styles';
import styles from './Button.css';

const Button = ({ isActive, isDisabled, children }) => (
  <button
    disabled={isDisabled}
    className={css(styles.button, isActive && styles.modifiers.active, isDisabled && styles.modifiers.disabled)}
  >
    {children}
  </button>
);
DOM output
<button disabled="" class="pf-c-button pf-is-disabled">
  Hello World
</button>