updating readme

This commit is contained in:
Alex Windett 2017-01-20 14:39:00 +00:00
parent 569b3182dd
commit e7905322a5
1 changed files with 48 additions and 13 deletions

View File

@ -9,19 +9,15 @@ const Base = require('../base');
const Container = require('../container'); const Container = require('../container');
const Row = require('../row'); const Row = require('../row');
const Column = require('../column'); const Column = require('../column');
const Avatar = require('./index.js'); const Table = require('./index.js');
const styles = require('./style.css');
nmodule.exports = ReactDOM.renderToString( nmodule.exports = ReactDOM.renderToString(
<Base> <Base>
<Row> <Table
<Column> columns={columns}
<Avatar color='#35a8c0' name='Alex' /> data={data}
</Column> title="This is the table title"
<Column> />
<Avatar color='#ef6176' name='Alex' src='https://openclipart.org/image/2400px/svg_to_png/177482/ProfilePlaceholderSuit.png' />
</Column>
</Row>
</Base> </Base>
); );
``` ```
@ -30,12 +26,51 @@ nmodule.exports = ReactDOM.renderToString(
```js ```js
const React = require('react'); const React = require('react');
const Avatar = require('ui/avatar'); const Avatar = require('ui/table');
const columns = [{
title: 'Memeber',
dataID: 'member',
dataKey: 'member',
width: ''
}, {
title: 'Status',
dataID: 'status',
dataKey: 'status',
width: ''
}, {
title: 'Role',
dataID: 'role',
dataKey: 'role',
width: ''
}, {
title: '',
dataID: 'delete',
dataKey: 'delete',
width: ''
}];
const data = [{
name: 'Nicola',
status: 'Active',
role: 'Owner',
key: 1
}, {
name: 'Alex',
status: 'Inactive',
role: 'Read Only',
key: 2
}];
module.exports = () => { module.exports = () => {
return ( return (
<Avatar color='#35a8c0' name='Alex' /> <Base>
<Avatar color='#ef6176' name='Alex' src='path/to/image.png' /> <Table
columns={columns}
data={data}
title="This is the table title"
/>
</Base>
); );
} }
``` ```