Skip to content

Commit

Permalink
Merge pull request mui#2221 from Nic128/added-proptypes
Browse files Browse the repository at this point in the history
[Doc] Added PropTypes validation to TextField and SelectField
  • Loading branch information
oliviertassinari committed Nov 19, 2015
2 parents acf0ede + 7b09ba4 commit 80548a8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
12 changes: 6 additions & 6 deletions docs/src/app/components/pages/components/select-fields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ const SelectFieldsPage = React.createClass({
},
{
name: 'errorText',
type: 'string',
type: 'node',
header: 'optional',
desc: 'The error text string to display.',
desc: 'The error content to display.',
},
{
name: 'floatingLabelStyle',
Expand All @@ -72,9 +72,9 @@ const SelectFieldsPage = React.createClass({
},
{
name: 'floatingLabelText',
type: 'string',
type: 'node',
header: 'optional',
desc: 'The text string to use for the floating label element.',
desc: 'The content to use for the floating label element.',
},
{
name: 'fullWidth',
Expand All @@ -84,9 +84,9 @@ const SelectFieldsPage = React.createClass({
},
{
name: 'hintText',
type: 'string',
type: 'node',
header: 'optional',
desc: 'The hint text string to display.',
desc: 'The hint content to display.',
},
{
name: 'iconStyle',
Expand Down
12 changes: 6 additions & 6 deletions docs/src/app/components/pages/components/text-fields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ const TextFieldsPage = React.createClass({
},
{
name: 'errorText',
type: 'string',
type: 'node',
header: 'optional',
desc: 'The error text string to display.',
desc: 'The error content to display.',
},
{
name: 'floatingLabelStyle',
Expand All @@ -85,9 +85,9 @@ const TextFieldsPage = React.createClass({
},
{
name: 'floatingLabelText',
type: 'string',
type: 'node',
header: 'optional',
desc: 'The text string to use for the floating label element.',
desc: 'The content to use for the floating label element.',
},
{
name: 'fullWidth',
Expand All @@ -103,9 +103,9 @@ const TextFieldsPage = React.createClass({
},
{
name: 'hintText',
type: 'string',
type: 'node',
header: 'optional',
desc: 'The hint text string to display.',
desc: 'The hint content to display.',
},
{
name: 'inputStyle',
Expand Down
6 changes: 3 additions & 3 deletions src/select-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ const SelectField = React.createClass({
},

propTypes: {
errorText: React.PropTypes.string,
floatingLabelText: React.PropTypes.string,
errorText: React.PropTypes.node,
floatingLabelText: React.PropTypes.node,
selectFieldRoot: React.PropTypes.object,
underlineStyle: React.PropTypes.object,
labelStyle: React.PropTypes.object,
errorStyle: React.PropTypes.object,
hintText: React.PropTypes.string,
hintText: React.PropTypes.node,
id: React.PropTypes.string,
multiLine: React.PropTypes.bool,
onBlur: React.PropTypes.func,
Expand Down
9 changes: 3 additions & 6 deletions src/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ const TextField = React.createClass({

propTypes: {
errorStyle: React.PropTypes.object,
errorText: React.PropTypes.string,
errorText: React.PropTypes.node,
floatingLabelStyle: React.PropTypes.object,
floatingLabelText: React.PropTypes.string,
floatingLabelText: React.PropTypes.node,
fullWidth: React.PropTypes.bool,
hintText: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.element,
]),
hintText: React.PropTypes.node,
hintStyle: React.PropTypes.object,
id: React.PropTypes.string,
inputStyle: React.PropTypes.object,
Expand Down

0 comments on commit 80548a8

Please sign in to comment.