2016-10-24 23:58:09 +03:00
|
|
|
# `<Column>`
|
|
|
|
|
|
|
|
## demo
|
|
|
|
|
|
|
|
```embed
|
|
|
|
const React = require('react');
|
|
|
|
const ReactDOM = require('react-dom/server');
|
2016-10-25 04:15:43 +03:00
|
|
|
const Base = require('../base');
|
|
|
|
const Container = require('../container');
|
2016-10-24 23:58:09 +03:00
|
|
|
const Row = require('../row');
|
|
|
|
const Column = require('./index');
|
|
|
|
|
|
|
|
const styles = {
|
2016-10-26 19:32:38 +03:00
|
|
|
base: {
|
2016-10-24 23:58:09 +03:00
|
|
|
backgroundColor: '#FFEBEE'
|
|
|
|
},
|
|
|
|
row: {
|
|
|
|
backgroundColor: '#EF5350'
|
|
|
|
},
|
|
|
|
column: {
|
|
|
|
backgroundColor: '#B71C1C',
|
2016-10-25 04:15:43 +03:00
|
|
|
textAlign: 'center',
|
2016-10-24 23:58:09 +03:00
|
|
|
color: 'white'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
nmodule.exports = ReactDOM.renderToString(
|
2016-10-26 19:32:38 +03:00
|
|
|
<Base style={styles.base}>
|
2016-10-24 23:58:09 +03:00
|
|
|
<Row style={styles.row} around>
|
2016-10-25 04:15:43 +03:00
|
|
|
<Column style={styles.column} xs={2}>1</Column>
|
|
|
|
<Column style={styles.column} xs={2}>2</Column>
|
|
|
|
<Column style={styles.column} xs={2}>3</Column>
|
2016-10-24 23:58:09 +03:00
|
|
|
</Row>
|
2016-10-26 19:32:38 +03:00
|
|
|
</Base>
|
2016-10-24 23:58:09 +03:00
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
## usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
const React = require('react');
|
2016-10-25 04:15:43 +03:00
|
|
|
const Container = require('ui/container');
|
2016-10-24 23:58:09 +03:00
|
|
|
const Row = require('ui/row');
|
2016-10-25 16:01:42 +03:00
|
|
|
const Column = require('ui/column');
|
2016-10-24 23:58:09 +03:00
|
|
|
|
|
|
|
module.exports = () => {
|
|
|
|
return (
|
2016-10-26 19:32:38 +03:00
|
|
|
<Row around>
|
|
|
|
<Column xs={2}>1</Column>
|
|
|
|
<Column xs={2}>2</Column>
|
|
|
|
<Column xs={2}>3</Column>
|
|
|
|
</Row>
|
2016-10-24 23:58:09 +03:00
|
|
|
);
|
|
|
|
};
|
|
|
|
```
|