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.


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

Deprecated Props

The following props are deprecated and will be removed in the next major version (11.0.0).

Property Type Description
render Function Works the same as children above


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


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

results matching ""

    No results matching ""