Skip to content

Commit

Permalink
[changed] Add missed prop types validations.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKVal committed Jun 21, 2015
1 parent 903b5d1 commit 23f9d21
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 7 deletions.
8 changes: 7 additions & 1 deletion src/DropdownButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint react/prop-types: [2, {ignore: "bsSize"}] */
/* BootstrapMixin contains `bsSize` type validation */

import React, { cloneElement } from 'react';
import classNames from 'classnames';

Expand All @@ -17,11 +20,14 @@ const DropdownButton = React.createClass({
dropup: React.PropTypes.bool,
title: React.PropTypes.node,
href: React.PropTypes.string,
id: React.PropTypes.string,
onClick: React.PropTypes.func,
onSelect: React.PropTypes.func,
navItem: React.PropTypes.bool,
noCaret: React.PropTypes.bool,
buttonClassName: React.PropTypes.string
buttonClassName: React.PropTypes.string,
className: React.PropTypes.string,
children: React.PropTypes.node
},

render() {
Expand Down
4 changes: 3 additions & 1 deletion src/Interpolate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const Interpolate = React.createClass({
displayName: 'Interpolate',

propTypes: {
format: React.PropTypes.string
component: React.PropTypes.node,
format: React.PropTypes.string,
unsafe: React.PropTypes.bool
},

getDefaultProps() {
Expand Down
1 change: 1 addition & 0 deletions src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const Modal = React.createClass({
backdrop: React.PropTypes.oneOf(['static', true, false]),
keyboard: React.PropTypes.bool,
closeButton: React.PropTypes.bool,
container: React.PropTypes.object,
animation: React.PropTypes.bool,
onRequestHide: React.PropTypes.func.isRequired,
dialogClassName: React.PropTypes.string,
Expand Down
6 changes: 5 additions & 1 deletion src/ModalTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ const ModalTrigger = React.createClass({
mixins: [OverlayMixin],

propTypes: {
modal: React.PropTypes.node.isRequired
modal: React.PropTypes.node.isRequired,
onBlur: React.PropTypes.func,
onFocus: React.PropTypes.func,
onMouseOut: React.PropTypes.func,
onMouseOver: React.PropTypes.func
},

getInitialState() {
Expand Down
5 changes: 5 additions & 0 deletions src/OverlayTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const OverlayTrigger = React.createClass({
delayHide: React.PropTypes.number,
defaultOverlayShown: React.PropTypes.bool,
overlay: React.PropTypes.node.isRequired,
onBlur: React.PropTypes.func,
onClick: React.PropTypes.func,
onFocus: React.PropTypes.func,
onMouseEnter: React.PropTypes.func,
onMouseLeave: React.PropTypes.func,
containerPadding: React.PropTypes.number,
rootClose: React.PropTypes.bool
},
Expand Down
5 changes: 4 additions & 1 deletion src/PanelGroup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsStyle"]}]*/
/* eslint react/prop-types: [2, {ignore: "bsStyle"}] */
/* BootstrapMixin contains `bsStyle` type validation */

import React, { cloneElement } from 'react';
import classNames from 'classnames';

Expand All @@ -12,6 +13,8 @@ const PanelGroup = React.createClass({
propTypes: {
accordion: React.PropTypes.bool,
activeKey: React.PropTypes.any,
className: React.PropTypes.string,
children: React.PropTypes.node,
defaultActiveKey: React.PropTypes.any,
onSelect: React.PropTypes.func
},
Expand Down
3 changes: 2 additions & 1 deletion src/ProgressBar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint react/prop-types: [1, {ignore: ["className", "bsStyle"]}]*/
/* eslint react/prop-types: [2, {ignore: "bsStyle"}] */
/* BootstrapMixin contains `bsStyle` type validation */

import React, { cloneElement, PropTypes } from 'react';
Expand All @@ -18,6 +18,7 @@ const ProgressBar = React.createClass({
striped: PropTypes.bool,
active: PropTypes.bool,
children: onlyProgressBar,
className: React.PropTypes.string,
interpolateClass: PropTypes.node,
isChild: PropTypes.bool
},
Expand Down
7 changes: 5 additions & 2 deletions src/SplitButton.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsSize"]}]*/
/* eslint react/prop-types: [2, {ignore: "bsSize"}] */
/* BootstrapMixin contains `bsSize` type validation */

import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
Expand All @@ -21,7 +22,9 @@ const SplitButton = React.createClass({
dropup: React.PropTypes.bool,
onClick: React.PropTypes.func,
onSelect: React.PropTypes.func,
disabled: React.PropTypes.bool
disabled: React.PropTypes.bool,
className: React.PropTypes.string,
children: React.PropTypes.node
},

getDefaultProps() {
Expand Down
6 changes: 6 additions & 0 deletions src/Thumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import BootstrapMixin from './BootstrapMixin';
const Thumbnail = React.createClass({
mixins: [BootstrapMixin],

propTypes: {
alt: React.PropTypes.string,
href: React.PropTypes.string,
src: React.PropTypes.string
},

getDefaultProps() {
return {
bsClass: 'thumbnail'
Expand Down

0 comments on commit 23f9d21

Please sign in to comment.