rofrischmann/fela

View on GitHub
benchmarks/ssr-comparison/src/classes-overload-test/cases/glamor.js

Summary

Maintainability
A
2 hrs
Test Coverage
import { renderStatic } from 'glamor/server'
import { style, flush } from 'glamor'
import { containerStyle, buttonStyles } from '../styles'
import { renderHtml, renderBody } from '../render'

export const glamorCase = caseName => {
  const getButtonClassName = i => style(buttonStyles[i])

  const { html, css } = renderStatic(() => renderBody(caseName, style(containerStyle), getButtonClassName))

  flush()

  return renderHtml(css, html)
}