#8: Add tooltips to settings [partial]

This commit is contained in:
2019-08-30 16:51:49 -05:00
parent 42515a08c3
commit 7e6e3cbc49
6 changed files with 116 additions and 6 deletions

View File

@@ -3,8 +3,16 @@ import './ConfigurationItem.css';
import settings from '../../assets/settings';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faInfoCircle} from '@fortawesome/free-solid-svg-icons';
import {connect} from 'react-redux';
import {notifyInfo} from '../../redux/actions/error_actions';
export default props => {
const mapDispatchToProps = dispatch => {
return {
notifyInfo: (title, msg) => dispatch(notifyInfo(title, msg))
}
};
export default connect(null, mapDispatchToProps)(props => {
const handleChanged = (e) => {
const target = e.target;
if (target.type === 'checkbox') {
@@ -17,7 +25,7 @@ export default props => {
if (settings[props.grouping] && settings[props.grouping][props.label]) {
const displayInfo = () => {
const description = settings[props.grouping][props.label];
alert(description);
props.notifyInfo(props.label, description);
};
infoDisplay = <a href={void(0)}
@@ -120,4 +128,4 @@ export default props => {
</table>
</div>
);
};
});