FelaTheme

FelaTheme is an alternative component to the withTheme-HoC leveraging the render-props pattern. It is used to access the theme object that is specified and passed down via context by a ThemeProvider.

Props

Property Type Description
render Function A render function that receives the theme object as its first parameter.

Imports

import { FelaTheme } from 'react-fela'
import { FelaTheme } from 'preact-fela'
import { FelaTheme } from 'inferno-fela'

Example

<FelaTheme
  render={theme => (
    <div>Primary color is ${theme.primary}.</div>
  )}
/>

results matching ""

    No results matching ""