title: using css modules, how can I import classes from a file
body: <p>I am using css modules for my project, and I have a file <strong>positioning.css</strong> which has some useful classes that I want to import. e.g. <code>.right,</code> <code>.left</code></p>
  
  <p>What is the best approach for this using CSS Modules?</p>
  
  <p>At the moment I can see 2 options, but they are not all that great:</p>
  
  <p><strong>composition in the component's style</strong></p>
  
  <pre><code>.right {
      composes: right from '../styles/positioning.css';
  }
  </code></pre>
  
  <p><strong>or</strong> </p>
  
  <p><strong>multiple css module imports in the component</strong></p>
  
  <pre><code>import positioning from '../styles/positioning.css'
  import styles from './myComponent.css';
  Object.assign(styles, positioning)
  
  class Menu extends Component {
  
    render() {
  
      return (
        &lt;div styleName='menu'&gt;
          &lt;div styleName='left'&gt;this is left&lt;/div&gt;
          &lt;div styleName='right'&gt;this is right&lt;/div&gt;
        &lt;/div&gt;
      );
    }
  };
  
  export default CSSModules(Menu, styles);
  </code></pre>