Skip to content
This repository has been archived by the owner on Nov 18, 2018. It is now read-only.

Commit

Permalink
Add input guide and fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
bokuweb committed Jul 1, 2016
1 parent b89de2c commit 5c19f4d
Show file tree
Hide file tree
Showing 17 changed files with 9,146 additions and 2,551 deletions.
2,517 changes: 1,260 additions & 1,257 deletions build/css.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/styles.js

Large diffs are not rendered by default.

30 changes: 22 additions & 8 deletions example/src/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,29 @@ export default class Example extends Component {
<Column>bbbb</Column>
<Column>cccc</Column>
</Columns>
<Input
state="isDisabled"
color="isDanger"
icon="fa fa-heart"
<div style={{ width: '300px'}}>
<Label>asdasd</Label>
<Input
state="isDisabled"
color="isDanger"
icon="fa fa-heart"
help={{
text: 'help text',
color: 'isSuccess',
}}
/>
text: 'help text',
color: 'isSuccess',
}}
/>
<Label>asdasd</Label>
<Input
color="isDanger"
icon="fa fa-heart"
hasIconRight
value="hoge"
help={{
text: 'help text',
color: 'isSuccess',
}}
/>
</div>
<Textarea
state="isLoading"
color="isInfo"
Expand Down
9 changes: 0 additions & 9 deletions lib/styles/column.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/forms/checkbox.js → src/elements/forms/checkbox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component, PropTypes } from 'react';
import styles from '../../build/styles';
import styles from '../../../build/styles';

export default class Checkbox extends Component {
static propTypes = {
Expand Down
4 changes: 2 additions & 2 deletions src/forms/index.js → src/elements/forms/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable react/no-multi-comp */

import React, { Component, PropTypes } from 'react';
import styles from '../../build/styles';
import { getCallbacks } from '../helper/helper';
import styles from '../../../build/styles';
import { getCallbacks } from '../../helper/helper';

export class FormHorizontal extends Component {
static propTypes = {
Expand Down
36 changes: 36 additions & 0 deletions src/elements/forms/input.examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### Import

`import { Input } from 're-bulma';`

### Input

<div>
<Label>Name</Label>
<Input type="text" placeholder="Text input" />
<Label>Username</Label>
<Input
color="isSuccess"
type="text"
placeholder="Textinput"
defaultValue="bulma"
icon="fa fa-check"
hasIconRight
help={{
color: 'isSuccess',
text: 'This username is available',
}}
/>
<Label>Email</Label>
<Input
color="isDanger"
type="text"
placeholder="Email input"
defaultValue="hello@"
icon="fa fa-warning"
hasIconRight
help={{
color: 'isDanger',
text: 'This email is invalid',
}}
/>
</div>
4 changes: 2 additions & 2 deletions src/forms/input.js → src/elements/forms/input.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import styles from '../../build/styles';
import { getCallbacks } from '../helper/helper';
import styles from '../../../build/styles';
import { getCallbacks } from '../../helper/helper';

export default class Input extends Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/forms/radio.js → src/elements/forms/radio.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component, PropTypes } from 'react';
import styles from '../../build/styles';
import styles from '../../../build/styles';

export default class Radio extends Component {
static propTypes = {
Expand Down
4 changes: 2 additions & 2 deletions src/forms/select.js → src/elements/forms/select.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import styles from '../../build/styles';
import { getCallbacks } from '../helper/helper';
import styles from '../../../build/styles';
import { getCallbacks } from '../../helper/helper';

export default class Select extends Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/forms/textarea.js → src/elements/forms/textarea.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component, PropTypes } from 'react';
import styles from '../../build/styles';
import styles from '../../../build/styles';

export default class Textarea extends Component {
static propTypes = {
Expand Down
7 changes: 7 additions & 0 deletions src/elements/label.examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Import

`import { Label } from 're-bulma';`

### Label

<Label>label</Label>
2 changes: 1 addition & 1 deletion src/label.js → src/elements/label.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component, PropTypes } from 'react';
import styles from '../build/styles';
import styles from '../../build/styles';

export default class Label extends Component {
static propTypes = {
Expand Down
18 changes: 9 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import Image from './elements/image';
import Notification from './elements/notification';
import Tag from './elements/tag';
import Progress from './elements/progress';

import { Columns, Column } from './columns';
import Label from './label';
import { FormHorizontal, ControlLabel } from './forms/';
import { FormHorizontal, ControlLabel } from './elements/forms/';
import Label from './elements/label';
import Group from './group';
import Addons from './addons';
import Input from './forms/input';
import Textarea from './forms/textarea';
import Select from './forms/select';
import Checkbox from './forms/checkbox';
import Radio from './forms/radio';
import Input from './elements/forms/input';
import Textarea from './elements/forms/textarea';
import Select from './elements/forms/select';
import Checkbox from './elements/forms/checkbox';
import Radio from './elements/forms/radio';

import { Columns, Column } from './columns';
import { Table, Td, Th, Tr, Tbody, Thead, Tfoot } from './table';
import { Tabs, TabGroup, Tab } from './tabs';
import Message from './message';
Expand Down
3 changes: 3 additions & 0 deletions src/styles/form.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.input {
box-sizing: border-box;
vertical-align: middle;
font: 99% sans-serif;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

select.select {
box-sizing: border-box;
vertical-align: middle;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
-moz-osx-font-smoothing: grayscale;
Expand All @@ -23,6 +25,7 @@ input[type="checkbox"].input {

select.select, textarea.textarea {
font: 99% sans-serif;
box-sizing: border-box;
}

input[type=button].input,
Expand Down
Loading

0 comments on commit 5c19f4d

Please sign in to comment.