aofolts
9/26/2018 - 2:22 PM

Combine Gatsby.js style imports

Combine Gatsby.js style imports

import css from '../less/home.module.less'
import heroLess from '../less/hero-home.module.less'
import introLess from '../less/section-home-intro.module.less'
import workLess from '../less/section-home-work.module.less'

css.hero = heroLess
css.intro = introLess
css.work = workLess

// You can now access the styles via one object

const Hero = (
  <div className={css.hero.container}>
    <h1 className={css.hero.headline}>Hi there!</h1>
  </div>
)