@patternfly/react-styles
TypeScript icon, indicating that this package has built-in type declarations

5.3.1 • 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 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>

Readme

Keywords

none

Package Sidebar

Install

npm i @patternfly/react-styles

Weekly Downloads

35,145

Version

5.3.1

License

MIT

Unpacked Size

4.98 MB

Total Files

788

Last publish

Collaborators

  • bennyp
  • dlabaj
  • ausuliv
  • dgutride
  • dlabrecq
  • patternfly-build
  • jeff-phillips-18
  • mturley
  • mwcz
  • kylebuch8
  • evwilkin
  • schulj12
  • nicolethoen
  • heymp
  • zhawkins