1.0.3-alpha.0 • Published 4 years ago
@isthatcentered/paint v1.0.3-alpha.0
paint
Merge default and override styles and classes for react component
import { StyleProps } from "@isthatcentered/paint"
import paint from "@isthatcentered/paint"
const MyComponent = (props: StyleProps<{myCustomProp: any}> ) => (
{/* You can provide only "className" or only "style" or both, as you wish 🤗 */}
<div {...paint({className: "a", style: {background: red}}, props)} />
)
<MyComponent
className="a b"
style={{color: green}}
/> // <div className="a b" style={{background: "red", color: "green"}}></div>
1.0.3-alpha.0
4 years ago
1.0.2-alpha.0
4 years ago