@stereobooster/unstyled-components
v1.0.0
Published
styled-components that Sebastian Markbåge would like
Downloads
3
Readme
unstyled-components
styled-components based on React's style prop
Example
import React from "react";
import isPropValid from "@emotion/is-prop-valid";
import { styled, ThemeProvider } from "@stereobooster/unstyled-components";
const H1 = styled("h1", {
shouldForwardProp: prop => isPropValid(prop) && prop !== "color"
})(props => ({
color: "hotpink",
background: props.theme.background
}));
export const StyledTest = () => (
<ThemeProvider theme={{ background: "#000" }}>
<H1 color="lightgreen">This is lightgreen.</H1>
</ThemeProvider>
);
Why?
...