All files / src/px-layout index.js

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41                                              1x                                  
import React from 'react';
 
import classnames from 'classnames';
import stylesheet from './style.scss';
 
/**
 * px-layout component
 * Renders a div with proper classes
 */
export default ({
  style,
  container,
  item,
  tiny,
  small,
  large,
  huge,
  flush,
  rev,
  middle,
  bottom,
  full,
  children}) => (
  <div className={classnames(
    'px-layout',
    {'layout': container},
    {'layout__item': item},
    {'layout--tiny': tiny},
    {'layout--small': small},
    {'layout--large': large},
    {'layout--huge': huge},
    {'layout--flush': flush},
    {'layout--rev': rev},
    {'layout--bottom': bottom},
    {'layout--full': full}
  )} style={style}>
    {children}
    <style jsx>{stylesheet}</style>
  </div>
);