File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,16 @@ import { setMode } from '../../actions/form'
66
77class ModeSelector extends Component {
88 static propTypes = {
9- location : PropTypes . object ,
9+ config : PropTypes . object ,
1010 label : PropTypes . string ,
11- setLocation : PropTypes . func ,
12- showLabel : PropTypes . boolean ,
13- type : PropTypes . string // replace with locationType?
11+ mode : PropTypes . string ,
12+ setMode : PropTypes . func ,
13+ showLabel : PropTypes . boolean
14+ }
15+
16+ static defaultProps = {
17+ label : 'Mode' ,
18+ showLabel : true
1419 }
1520
1621 _onChange = ( evt ) => {
@@ -29,9 +34,7 @@ class ModeSelector extends Component {
2934 }
3035
3136 render ( ) {
32- const { config, mode } = this . props
33- const label = this . props . label || 'Mode:'
34- const showLabel = this . props . showLabel === undefined ? true : this . props . showLabel
37+ const { config, mode, label, showLabel } = this . props
3538
3639 return (
3740 < form >
You can’t perform that action at this time.
0 commit comments