How to use the react-fela.createFela function in react-fela

To help you get started, we’ve selected a few react-fela 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 olymp / olymp / packages / fela / src / storybook.js View on Github external
import React from 'react';
import { ThemeProvider, createFela } from 'react-fela';
import { Provider as FelaProvider } from 'react-fela';
import { MemoryRouter } from 'react-router';

const ss = document.getElementById('fela') || document.createElement('style');
if (!ss.id) {
  ss.id = 'fela';
  ss.type = 'text/css';
  document.getElementsByTagName('head')[0].appendChild(ss);
}

const renderer = createFela();

export const FelaDecorator = story =>
  (
    {story()}
  );

export const RouterDecorator = story =>
  {story()};