rofrischmann/fela

View on GitHub
benchmarks/ssr-comparison/src/style-overload-test/cases/free-style.js

Summary

Maintainability
A
3 hrs
Test Coverage
import FreeStyle from 'free-style'
import { containerStyle, buttonStyles } from '../styles'
import { renderHtml, renderBody } from '../render'

export const freeStyleCase = caseName => {
  const Style = FreeStyle.create()

  const getButtonClassName = i => Style.registerStyle(buttonStyles[i])

  const html = renderBody(caseName, Style.registerStyle(containerStyle), getButtonClassName)

  const css = Style.getStyles()

  return renderHtml(css, html)
}