Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 750 Bytes

provider.md

File metadata and controls

39 lines (28 loc) · 750 Bytes

<Provider>

Provider is primarily required so that your nested <Styled> components get access to the renderer.

import { createRenderer } from "fela";
import { Provider } from "fela-components";

const renderer = createRenderer();

<Provider
  renderer={renderer}>
  <Styled visual={{ color: "cornflowerblue" }}>
    This will be properly styled.
  </Styled>
</Provider>

renderer: Fela Renderer

An instance of Fela Renderer.

staticStyles: string

A string representing static CSS that should be injected to the DOM as soon as the Provider mounts.

<Provider
  renderer={renderer}
  staticStyles="html {-webkit-font-smoothing: antialiased}">
  ...
</Provider>