joyent-portal/ui/src/components/table-simple-table
2017-02-23 15:09:27 +00:00
..
index.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00
readme.md renaming directories. Table >> Simple Table and Table New >> Data Table 2017-01-20 14:21:26 +00:00
story.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00
table-body.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00
table-head.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00
table-item.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00
table-row.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00
table.js convert commonjs to es2015 modules (fixes #234) 2017-02-23 15:09:27 +00:00

<Avatar>

demo

const React = require('react');
const ReactDOM = require('react-dom/server');
const Base = require('../base');
const Container = require('../container');
const Row = require('../row');
const Column = require('../column');
const Avatar = require('./index.js');
const styles = require('./style.css');

nmodule.exports = ReactDOM.renderToString(
  <Base>
    <Row>
      <Column>
        <Avatar color='#35a8c0' name='Alex' />
      </Column>
      <Column>
        <Avatar color='#ef6176' name='Alex' src='https://openclipart.org/image/2400px/svg_to_png/177482/ProfilePlaceholderSuit.png' />
      </Column>
    </Row>
  </Base>
);

usage

const React = require('react');
const Avatar = require('ui/avatar');

module.exports = () => {
  return (
    <Avatar color='#35a8c0' name='Alex' />
    <Avatar color='#ef6176' name='Alex' src='path/to/image.png' />
  );
}