How to use the fela-bindings.ThemeProviderFactory function in fela-bindings

To help you get started, we’ve selected a few fela-bindings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robinweser / fela / packages / preact-fela / src / ThemeProvider.js View on Github external
/* @flow */
import { Component } from 'preact'
import { ThemeProviderFactory } from 'fela-bindings'

export default ThemeProviderFactory(Component, children => children[0], {
  defaultProps: {
    overwrite: false,
  },
})
github robinweser / fela / packages / inferno-fela / src / ThemeProvider.js View on Github external
/* @flow */
import Component from 'inferno-component'
import { ThemeProviderFactory } from 'fela-bindings'

export default ThemeProviderFactory(Component, children => children, {
  defaultProps: {
    overwrite: false,
  },
})
github robinweser / fela / packages / react-fela / src / ThemeProvider.js View on Github external
/* @flow */
import { Component } from 'react'
import { ThemeProviderFactory } from 'fela-bindings'
import PropTypes from 'prop-types'

export default ThemeProviderFactory(Component, children => children, {
  propTypes: {
    theme: PropTypes.object.isRequired,
    overwrite: PropTypes.bool
  },
  childContextTypes: {
    theme: PropTypes.object
  },
  contextTypes: {
    theme: PropTypes.object
  },
  defaultProps: {
    overwrite: false
  }
})