Skip to content

Commit

Permalink
Updating docs with new Static component
Browse files Browse the repository at this point in the history
  • Loading branch information
aabenoja committed May 26, 2015
1 parent 0c61f46 commit 93c95b6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/examples/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"CarouselItem",
"Col",
"DropdownButton",
"FormControls",
"Glyphicon",
"Grid",
"Input",
Expand Down
1 change: 0 additions & 1 deletion docs/examples/InputTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const inputTypeInstance = (
<option value='other'>...</option>
</Input>
<Input type='textarea' label='Text Area' placeholder='textarea' />
<Input type='static' value='Static Text' />
<ButtonInput value='Button Input' />
<ButtonInput type='reset' value='Reset Button' />
<ButtonInput type='submit' value='Submit Button' />
Expand Down
9 changes: 9 additions & 0 deletions docs/examples/StaticText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const staticTextExample = (
<form className="form-horizontal">
<FormControls.Static className="col-xs-10 col-xs-offset-2" value="I'm in a form" />
<FormControls.Static label="First Name" labelClassName="col-xs-2" wrapperClassName="col-xs-10" value="Billy" />
<FormControls.Static label="Last Name" labelClassName="col-xs-2" wrapperClassName="col-xs-10">Bob</FormControls.Static>
</form>
);

React.render(staticTextExample, mountNode);
4 changes: 3 additions & 1 deletion docs/src/ComponentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ const ComponentsPage = React.createClass({
The helper method <code>getInputDOMNode()</code> returns the internal input element. If you don't want the <code>form-group</code> class applied apply the prop named <code>standalone</code>.</p>
<ReactPlayground codeText={Samples.Input} />
<h2 id='input-types'>Types</h2>
<p>Supports <code>select</code>, <code>textarea</code>, <code>static</code> as well as standard HTML input types. <code>getValue()</code> returns an array for multiple select.</p>
<p>Supports <code>select</code>, <code>textarea</code>, as well as standard HTML input types. <code>getValue()</code> returns an array for multiple select.</p>
<ReactPlayground codeText={Samples.InputTypes} />
<p>Static text can be added to your form controls through the use of the <code>FormControls.Static</code> component.</p>
<ReactPlayground codeText={Samples.StaticText} />
<h2 id='button-input-types'>Button Input Types</h2>
<p>Form buttons are encapsulated by <code>ButtonInput</code>. Pass in <code>type="reset"</code> or <code>type="submit"</code> to suit your needs. Styling is the same as <code>Button</code>.</p>
<ReactPlayground codeText={Samples.ButtonInput} />
Expand Down
2 changes: 2 additions & 0 deletions docs/src/ReactPlayground.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import * as modCarousel from '../../src/Carousel';
import * as modCarouselItem from '../../src/CarouselItem';
import * as modCol from '../../src/Col';
import * as modDropdownButton from '../../src/DropdownButton';
import * as modFormControls from '../../src/FormControls';
import * as modGlyphicon from '../../src/Glyphicon';
import * as modGrid from '../../src/Grid';
import * as modInput from '../../src/Input';
Expand Down Expand Up @@ -64,6 +65,7 @@ const Carousel = modCarousel.default;
const CarouselItem = modCarouselItem.default;
const Col = modCol.default;
const DropdownButton = modDropdownButton.default;
const FormControls = modFormControls.default;
const Glyphicon = modGlyphicon.default;
const Grid = modGrid.default;
const Input = modInput.default;
Expand Down
1 change: 1 addition & 0 deletions docs/src/Samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default {
TableResponsive: require('fs').readFileSync(__dirname + '/../examples/TableResponsive.js', 'utf8'),
Input: require('fs').readFileSync(__dirname + '/../examples/Input.js', 'utf8'),
InputTypes: require('fs').readFileSync(__dirname + '/../examples/InputTypes.js', 'utf8'),
StaticText: require('fs').readFileSync(__dirname + '/../examples/StaticText.js', 'utf8'),
ButtonInput: require('fs').readFileSync(__dirname + '/../examples/ButtonInput.js', 'utf8'),
InputAddons: require('fs').readFileSync(__dirname + '/../examples/InputAddons.js', 'utf8'),
InputSizes: require('fs').readFileSync(__dirname + '/../examples/InputSizes.js', 'utf8'),
Expand Down

0 comments on commit 93c95b6

Please sign in to comment.