Unify proptypes in util/proptypes.js (#3728)
* Unify proptypes in util/proptypes.js * Add missing use of nodeOrStringProptype
This commit is contained in:
@@ -16,17 +16,15 @@
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
|
||||
import { nodeOrStringProptype } from '~/util/proptypes';
|
||||
|
||||
import styles from './title.css';
|
||||
|
||||
export default class Title extends Component {
|
||||
static propTypes = {
|
||||
className: PropTypes.string,
|
||||
title: PropTypes.oneOfType([
|
||||
PropTypes.string, PropTypes.node
|
||||
]),
|
||||
byline: PropTypes.oneOfType([
|
||||
PropTypes.string, PropTypes.node
|
||||
])
|
||||
title: nodeOrStringProptype,
|
||||
byline: nodeOrStringProptype
|
||||
}
|
||||
|
||||
state = {
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { Card } from 'material-ui/Card';
|
||||
|
||||
import { nodeOrStringProptype } from '~/util/proptypes';
|
||||
|
||||
import Title from './Title';
|
||||
|
||||
import styles from './container.css';
|
||||
@@ -28,9 +30,7 @@ export default class Container extends Component {
|
||||
compact: PropTypes.bool,
|
||||
light: PropTypes.bool,
|
||||
style: PropTypes.object,
|
||||
title: PropTypes.oneOfType([
|
||||
PropTypes.string, PropTypes.node
|
||||
])
|
||||
title: nodeOrStringProptype
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
Reference in New Issue
Block a user