Sha256: bc17b3880c7804d2b9695972e6450f2e2cc765d75b7ec37832856570c5ef5335
Contents?: true
Size: 1.91 KB
Versions: 12
Compression:
Stored size: 1.91 KB
Contents
Rev.registerExample('<Form> with <Input>, <Textarea>', class FormsExample extends React.Component { render() { const {Row, Col, Form, Input, Textarea, Checkbox, Radio, Select, Option, Switch} = Rev.Components return ( <div> <Form> <Row> <Col><Input type="text" placeholder="Has a placeholder but no label" /></Col> <Col><Input type="text" label="This one has a label" /></Col> <Col large={6}> <Input type="text" label="Another Error" error="Invalid entry" /> </Col> <Col large={6}> <Input type="text" label="Yet Another Error" error="Invalid entry" /> </Col> <Col> <Input dom="textarea" label="You can override the inner DOM tag" placeholder="<Input dom={React.DOM.textarea}>" /> <Textarea label="This one has an error" placeholder="Or you can just use a <Textarea /> component" error="Invalid entry" /> </Col> <Col> <Input type="checkbox" label="One" /> <Checkbox label="Two" /> </Col> <Col> <Input type="radio" name="myRadio" label="This" /> <Radio name="myRadio" label="That" /> </Col> <Col> <Input dom="select" label="Pick something"> <option value="one">one</option> <option value="two">two</option> </Input> <Select label="Pick another thing" error="Oh no a thing is wrong!" defaultValue="two"> <Option value="one">1</Option> <Option value="two">2</Option> </Select> </Col> <Col><Switch />{"This is a <Switch>"}</Col> </Row> </Form> </div> ) } })
Version data entries
12 entries across 12 versions & 1 rubygems