1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-15 07:40:07 +02:00
copilot/ui/src/components/column/readme.md

57 lines
1.1 KiB
Markdown
Raw Normal View History

2016-10-24 23:58:09 +03:00
# `<Column>`
## demo
```embed
const React = require('react');
const ReactDOM = require('react-dom/server');
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 = {
container: {
2016-10-24 23:58:09 +03:00
backgroundColor: '#FFEBEE'
},
row: {
backgroundColor: '#EF5350'
},
column: {
backgroundColor: '#B71C1C',
textAlign: 'center',
2016-10-24 23:58:09 +03:00
color: 'white'
}
};
nmodule.exports = ReactDOM.renderToString(
<Container style={styles.container}>
2016-10-24 23:58:09 +03:00
<Row style={styles.row} around>
<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>
</Container>
2016-10-24 23:58:09 +03:00
);
```
## usage
```js
const React = require('react');
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 (
<Container>
2016-10-24 23:58:09 +03:00
<Row around>
<Column xs={2}>1</Column>
<Column xs={2}>2</Column>
<Column xs={2}>3</Column>
</Row>
</Container>
2016-10-24 23:58:09 +03:00
);
};
```