1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 13:50:06 +02:00
copilot/ui/src/components/textarea
2017-01-12 19:04:52 +00:00
..
index.js convert every px measure into rem 2017-01-12 19:04:52 +00:00
readme.md creating textarea component 2017-01-11 17:04:07 +00:00
story.js creating textarea component 2017-01-11 17:04:07 +00:00

Input

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 Input = require('./index.js');

nmodule.exports = ReactDOM.renderToString(
  <Base>
    <Row>
      <Column>
        <Input
          placeholder='Enter email'
          label='Email Address'
          type='email'
        >
          <small>We'll never share your email with anyone else.</small>
        </Input>
      </Column>
    </Row>
    <Row>
      <Column>
        <Input placeholder='Password' type='password'>
          Password
        </Input>
      </Column>
    </Row>
  </Base>
);

usage

const React = require('react');
const Input = require('ui/input');

module.exports = () => {
  return (
    <div>
      <Input
        placeholder='Enter email'
        label='Email Address'
        type='email'
      >
        <small>We'll never share your email with anyone else.</small>
      </Input>
      <Input placeholder='Password' type='password'>
        Password
      </Input>
    </div>
  );
}