CSS-in-JS for ReactJS
npm install bau-reactcssThis package is based on BauCSS and adds a styled component for React.

``js
import BauReactCss from "bau-reactcss";
const { css, styled, keyframes, createGlobaStyles } = BauReactCss();
`
`js
createGlobalStyles
:root {
margin: 0px;
--main-color: midnightblue;
};`
`jsx
const blue = css
color: var(--main-color);;
A blue paragraph
;You can create a component:
`jsx
const colored = (props)=> css;const P = (props) => {
const {children, ...rest} = props
{children}
)
}A blue paragraph
A red paragraph
`Create a styled component
`jsx
const Btn = (props) => style("button", props);Blue button ;
`Create a keyframe
`js
const rescale = keyframes;const red = css
Check this
`Example of conditional classes
You have two ways to use it. Define a function or object that returns CSS strings:
`jsx
const styles = (props) => {
base: ,
danger: ,
disabled: ;
}
`You can write:
`jsx
const Btn = (props)=> styled('button', props)Base button
alert('danger')}>Danger button
`To make life easier, the primitive
styled can read the props and sets the class when you use the styles object above:`jsx
const Button = (props) => styled("button", props);
danger="true"
className={css
}
>
Shadowed Danger
;
``