Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@patternfly/react-styles

4.3.4 • Public • Published

@patternfly/react-styles

Library that provides CSS-in-JS capabilities

Example

import { css } from '@patternfly/react-styles';
import styles from './Button.css';
 
const Buttton = ({ 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>

Keywords

none

Install

npm i @patternfly/[email protected]

Version

4.3.4

License

MIT

Unpacked Size

3.69 MB

Total Files

415

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar