Declare types on settings
This commit is contained in:
parent
be900aa25c
commit
ee078c677b
5 changed files with 36 additions and 0 deletions
|
@ -2,6 +2,7 @@ import './BlacklistForm.scss';
|
|||
import AddButton from '../ui/AddButton';
|
||||
import DeleteButton from '../ui/DeleteButton';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class BlacklistForm extends React.Component {
|
||||
|
||||
|
@ -49,4 +50,9 @@ class BlacklistForm extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
BlacklistForm.propTypes = {
|
||||
value: PropTypes.arrayOf(PropTypes.string),
|
||||
onChange: PropTypes.func,
|
||||
};
|
||||
|
||||
export default BlacklistForm;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import './KeymapsForm.scss';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Input from '../ui/Input';
|
||||
import keymaps from '../../keymaps';
|
||||
|
||||
|
@ -44,4 +45,9 @@ class KeymapsForm extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
KeymapsForm.propTypes = {
|
||||
value: PropTypes.objectOf(PropTypes.string),
|
||||
onChange: PropTypes.func,
|
||||
};
|
||||
|
||||
export default KeymapsForm;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import './PropertiesForm.scss';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class PropertiesForm extends React.Component {
|
||||
|
||||
|
@ -57,4 +58,9 @@ class PropertiesForm extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
PropertiesForm.propTypes = {
|
||||
value: PropTypes.objectOf(PropTypes.any),
|
||||
onChange: PropTypes.func,
|
||||
};
|
||||
|
||||
export default PropertiesForm;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import './SearchForm.scss';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import AddButton from '../ui/AddButton';
|
||||
import DeleteButton from '../ui/DeleteButton';
|
||||
|
||||
|
@ -75,4 +76,13 @@ class SearchForm extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
SearchForm.propTypes = {
|
||||
value: PropTypes.shape({
|
||||
default: PropTypes.string,
|
||||
engines: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)),
|
||||
}),
|
||||
onChange: PropTypes.func,
|
||||
|
||||
};
|
||||
|
||||
export default SearchForm;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import './Input.scss';
|
||||
|
||||
class Input extends React.Component {
|
||||
|
@ -49,4 +50,11 @@ class Input extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
Input.propTypes = {
|
||||
type: PropTypes.string,
|
||||
error: PropTypes.string,
|
||||
label: PropTypes.string,
|
||||
value: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Input;
|
||||
|
|
Reference in a new issue