diff options
| author | Haishan <[email protected]> | 2018-10-20 20:32:02 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2018-10-20 20:32:02 +0800 |
| commit | 133b29c9dac2209a3c88c3289f84ff709d404392 (patch) | |
| tree | e023785cc82db732c64328a5d99938992eceecfd /src/components/StyleGuide.js | |
first commit
Diffstat (limited to 'src/components/StyleGuide.js')
| -rw-r--r-- | src/components/StyleGuide.js | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/components/StyleGuide.js b/src/components/StyleGuide.js new file mode 100644 index 0000000..f631d7d --- /dev/null +++ b/src/components/StyleGuide.js @@ -0,0 +1,60 @@ +import React, { PureComponent } from 'react'; + +import ToggleSwitch from 'c/ToggleSwitch'; +import Input from 'c/Input'; +import Switch from 'c/Switch'; +import Button from 'c/Button'; +import Modal from 'c/Modal'; +import APIConfig from 'c/APIConfig'; + +const paneStyle = { + padding: '20px 0' +}; + +const optionsRule = [ + { + label: 'Global', + value: 'Global' + }, + { + label: 'Rule', + value: 'Rule' + }, + { + label: 'Direct', + value: 'Direct' + } +]; + +const Pane = ({ children }) => <div style={paneStyle}>{children}</div>; + +class StyleGuide extends PureComponent { + render() { + return ( + <div> + <Pane> + <Switch /> + </Pane> + <Pane> + <Input /> + </Pane> + <Pane> + <ToggleSwitch + name="test" + options={optionsRule} + value="Rule" + onChange={() => {}} + /> + </Pane> + <Pane> + <Button label="Test Latency" /> + </Pane> + <Modal isOpen={true} onRequestClose={() => {}}> + <APIConfig /> + </Modal> + </div> + ); + } +} + +export default StyleGuide; |
