2015-09-03 14:26:25 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
2015-09-07 11:40:05 +02:00
|
|
|
import { Button, SecondaryButton, DangerButton } from '../../lib/buttons';
|
2015-09-03 14:26:25 +02:00
|
|
|
import Panel from 'react-bootstrap/lib/Panel';
|
|
|
|
|
|
|
|
|
|
|
|
let Buttons = React.createClass({
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<h2>Button</h2>
|
2015-09-07 11:40:05 +02:00
|
|
|
<p><code>import { Button, SecondaryButton, DangerButton } from './js/lib/buttons';</code></p>
|
2015-09-03 14:26:25 +02:00
|
|
|
<Panel header='example'>
|
2015-09-07 11:40:05 +02:00
|
|
|
<h4>In the wild</h4>
|
2015-09-03 14:26:25 +02:00
|
|
|
<div>
|
2015-09-07 11:40:05 +02:00
|
|
|
<p>This is a paragraph with <Button>{"a button"}</Button> that should be displayed inline</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h4>Different states</h4>
|
|
|
|
<div>
|
|
|
|
<Button>button</Button>
|
|
|
|
<Button status="disabled">disabled</Button>
|
|
|
|
<Button status="loading">loading</Button>
|
2015-09-03 14:26:25 +02:00
|
|
|
</div>
|
|
|
|
|
2015-09-07 11:40:05 +02:00
|
|
|
<h4>In a form</h4>
|
2015-09-03 14:26:25 +02:00
|
|
|
<div>
|
|
|
|
<p>This is a form with a large submit button
|
|
|
|
<form className="ascribe-form-bordered">
|
2015-09-07 11:40:05 +02:00
|
|
|
<div className="footer">
|
|
|
|
<Button>
|
|
|
|
Submit nao
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h4>In a form with multiple buttons</h4>
|
|
|
|
<div>
|
|
|
|
<p>This is a form with many buttons
|
|
|
|
<form className="ascribe-form-bordered">
|
|
|
|
<div className="footer">
|
|
|
|
<Button>
|
|
|
|
Submit nao
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button>
|
|
|
|
Submit later
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<SecondaryButton>
|
|
|
|
Cancel
|
|
|
|
</SecondaryButton>
|
|
|
|
|
|
|
|
<DangerButton>
|
|
|
|
Delete
|
|
|
|
</DangerButton>
|
|
|
|
</div>
|
2015-09-03 14:26:25 +02:00
|
|
|
</form>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</Panel>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<SecondaryButton>
|
|
|
|
{"<SecondaryButton>"}
|
|
|
|
</SecondaryButton>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default Buttons;
|