Miss any of our Open RFC calls?Watch the recordings here! »

@patternfly/react-styles

4.4.2 • 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/react-styles

DownloadsWeekly Downloads

10,924

Version

4.4.2

License

MIT

Unpacked Size

3.71 MB

Total Files

418

Last publish

Collaborators

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