@oberd/postcss-classnames
v1.1.3
Published
Helper function to transform class map objects from PostCSS to strings
Readme
PostCSS Classnames
Instead of combining classnames from PostCSS objects using typical object syntax, write classes like you normally would with this helper function.
Usage
npm i -S @oberd/postcss-classnamesimport globalStyles from '../styles.css';
import moduleStyles from './button.css';
import classnames from '@oberd/postcss-classnames';
const css = classnames(globalStyles, moduleStyles);
css('button-class global-class');
// Will return class string for rendering
// 'Button__button-class__2 Global__global-class__1'