1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-29 06:30:07 +02:00
copilot/ui/src/components/avatar
2017-01-11 14:03:53 +00:00
..
index.js implimenting tooltip component 2016-12-21 11:19:59 +00:00
readme.md changing props name to be more consistant 2016-10-28 12:47:58 +01:00
story.js moving avatar story and data used for it 2017-01-11 14:03:53 +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' />
  );
}