rofrischmann/fela

View on GitHub
benchmarks/src/implementations/css-modules/Box.js

Summary

Maintainability
A
0 mins
Test Coverage
/* eslint-disable react/prop-types */
import classnames from 'classnames';
import React from 'react';
import View from './View';
import styles from './box-styles.css';

const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
  <View
    {...other}
    className={classnames(styles[`color${color}`], {
      [styles.fixed]: fixed,
      [styles.outer]: outer,
      [styles.row]: layout === 'row'
    })}
  />
);

export default Box;