1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-29 06:30:07 +02:00
copilot/ui/src/components/modal
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 Adding modal to side nav and refactoring 2016-11-23 12:04:49 +00:00
story.js convert every px measure into rem 2017-01-12 19:04:52 +00:00

<Modal>

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

const trigger = () => {
  return (
    <p>This is the trigger</p>
  )
};

nmodule.exports = ReactDOM.renderToString(
  <Base>
    <Row>
      <Column>  
        <Modal name="modal1" trigger={trigger} >
          <h2>This is the Modal</h2>
        </Modal>
      </Column>
    </Row>  
  </Base>
);

usage

const React = require('react');
const Modal = require('ui/button');

const trigger = () => {
  return (
    <p>This is the trigger</p>
  )
};

module.exports = () => {
  return (
    <Modal name="modal1" trigger={trigger} >
      <h2>This is the Modal</h2>
    </Modal>
  );
}