1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Fix PropType warnings for components in ascribe_detail

This commit is contained in:
Brett Sun 2015-10-28 18:37:09 +01:00
parent c72a5aa308
commit 784098f225
5 changed files with 13 additions and 3 deletions

View File

@ -6,13 +6,18 @@ let DetailProperty = React.createClass({
propTypes: { propTypes: {
label: React.PropTypes.string, label: React.PropTypes.string,
value: React.PropTypes.oneOfType([ value: React.PropTypes.oneOfType([
React.PropTypes.number,
React.PropTypes.string, React.PropTypes.string,
React.PropTypes.element React.PropTypes.element
]), ]),
separator: React.PropTypes.string, separator: React.PropTypes.string,
labelClassName: React.PropTypes.string, labelClassName: React.PropTypes.string,
valueClassName: React.PropTypes.string, valueClassName: React.PropTypes.string,
ellipsis: React.PropTypes.bool ellipsis: React.PropTypes.bool,
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.element),
React.PropTypes.element
])
}, },
getDefaultProps() { getDefaultProps() {

View File

@ -19,6 +19,7 @@ let EditionContainer = React.createClass({
propTypes: { propTypes: {
actionPanelButtonListType: React.PropTypes.func, actionPanelButtonListType: React.PropTypes.func,
furtherDetailsType: React.PropTypes.func, furtherDetailsType: React.PropTypes.func,
params: React.PropTypes.object,
location: React.PropTypes.object location: React.PropTypes.object
}, },

View File

@ -27,7 +27,7 @@ let FurtherDetailsFileuploader = React.createClass({
getDefaultProps() { getDefaultProps() {
return { return {
label: "Additional files", label: 'Additional files',
multiple: false multiple: false
}; };
}, },

View File

@ -20,7 +20,10 @@ let Piece = React.createClass({
subheader: React.PropTypes.object, subheader: React.PropTypes.object,
buttons: React.PropTypes.object, buttons: React.PropTypes.object,
loadPiece: React.PropTypes.func, loadPiece: React.PropTypes.func,
children: React.PropTypes.object children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.element),
React.PropTypes.element
])
}, },

View File

@ -46,6 +46,7 @@ import { setDocumentTitle } from '../../utils/dom_utils';
*/ */
let PieceContainer = React.createClass({ let PieceContainer = React.createClass({
propTypes: { propTypes: {
params: React.PropTypes.object,
furtherDetailsType: React.PropTypes.func, furtherDetailsType: React.PropTypes.func,
location: React.PropTypes.object location: React.PropTypes.object
}, },