class-props
v1.0.0
Published
React component for quickly applying multiple classNames – great for libraries like Tachyons and Basscss
Downloads
6
Readme
class-props
React component for quickly applying multiple classNames – great for libraries like Tachyons and Basscss
npm i class-props
import React from 'react'
import Base from 'class-props'
const App = props => (
<React.Fragment>
<link ref='stylesheet' href='https://unpkg.com/[email protected]/css/basscss.min.css' />
<Base px3 py4>
<Base is='h1' h1>
Hello
</Base>
</Base>
</React.Fragment>
)
// Creating a style component
const Heading = props =>
<Base
is='h2'
{...props}
h2
mt3
mb2
/>