Skip to content

Files

Latest commit

d414d15 · Apr 27, 2020

History

History
38 lines (28 loc) · 732 Bytes

api-reference.md

File metadata and controls

38 lines (28 loc) · 732 Bytes

API reference

cease default exports a single function, css.


css

css`stylesheet`(Component) → StyledComponent

Parameters
stylesheet
A CSS string
Component
Your React component (class or function)
Return value
StyledComponent
A new React component rendering the passed Component in a Shadow DOM root attached to a new wrapping div, with CSS rules from stylesheet applied
Example
const StyledButton = css`
  button {
    color: red;
  }
  button .icon {
    color: black;
  }
`(Button)