How to use the fela-tools.combineMultiRules function in fela-tools

To help you get started, we’ve selected a few fela-tools 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 / fela-bindings / src / connectFactory.js View on Github external
render() {
          const { renderer } = this.context
          const { extend, _felaTheme, _felaRules, ...otherProps } = this.props

          const allRules = [rules]
          if (_felaRules) {
            allRules.push(_felaRules)
          }
          if (extend) {
            allRules.push(extend)
          }

          const combinedRules = combineMultiRules(...allRules)
          const preparedRules = combinedRules(
            {
              ...otherProps,
              theme: _felaTheme,
            },
            renderer
          )

          if (component._isFelaComponent) {
            return createElement(component, {
              _felaRules: combinedRules,
              ...otherProps,
            })
          }

          const styles = objectReduce(