joyent-portal/ui/src/components/radio
2016-10-31 12:03:48 +00:00
..
index.js don't duplicate label and children in <Radio /> 2016-10-31 12:03:48 +00:00
readme.md implement <RadioGroup> 2016-10-28 01:22:47 +01:00
style.css replace postcs-module-values with postcss-constants 2016-10-28 16:09:15 +01:00

<Radio >

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 Radio = require('./index.js');
const styles = require('./style.css');

nmodule.exports = ReactDOM.renderToString(
  <Base>
    <Row>
      <Column>
        <Radio name='gender' value='female' checked={false}>
          Female
        </Radio>
        <Radio name='gender' value='male' checked={true}>
          Male
        </Radio>
      </Column>
    </Row>
  </Base>
);

usage

const React = require('react');
const Radio = require('ui/radio');

module.exports = () => {
  return (
    <Radio name='gender' value='female' label='Female' />
    <Radio name='gender' value='male' label='Male' checked/>
  );
}