mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
19 lines
476 B
JavaScript
19 lines
476 B
JavaScript
/* eslint-disable react/prop-types */
|
|
import classnames from 'classnames';
|
|
import React from 'react';
|
|
import View from '../View/css-modules';
|
|
import styles from './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'
|
|
})}
|
|
/>
|
|
);
|
|
|
|
module.exports = Box;
|