1.0.0 • Published 5 years ago

@stereobooster/unstyled-components v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

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?

...