@vtex/css-handles
v1.1.3
Published
> Module for handling CSS classes
Downloads
11,512
Maintainers
Keywords
Readme
@vtex/css-handles
Module for handling CSS classes
Setup
yarn add @vtex/css-handles
Usage
import React from 'react'
import { generateBlockClass } from '@vtex/css-handles'
import styles from './styles.css'
const FooComponent = ({ blockClass }) => {
const classes = generateBlockClass(styles.container, blockClass)
return (
<div className={classes}>
Hello world!
</div>
)
}
export default FooComponent
It will render:
<div class="vtex-foo-1-x-container vtex-foo-1-x-container--bar">
Hello world!
</div>
Development
After installing dependencies, with yarn
, run:
yarn run build
Publishing
After installing dependencies, with yarn
, run:
yarn run publish