#8: Add tooltips to settings [partial]
This commit is contained in:
30
src/components/InfoDetails/InfoDetails.js
Normal file
30
src/components/InfoDetails/InfoDetails.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import React from 'react';
|
||||
import {dismissInfo} from '../../redux/actions/error_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import Box from '../UI/Box/Box';
|
||||
import Button from '../UI/Button/Button';
|
||||
import './InfoDetails.css';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
InfoMessage: state.error.InfoStack.length > 0 ? state.error.InfoStack[0] : '',
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
dismissInfo: () => dispatch(dismissInfo()),
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
return (
|
||||
<Box dxDark dxStyle={{padding: '8px'}}>
|
||||
<h1 className={'InfoDetailsHeading'}>{props.InfoMessage.title}</h1>
|
||||
<div className={'InfoDetailsContent'}>
|
||||
<p style={{textAlign: 'left'}}>{props.InfoMessage.message}</p>
|
||||
</div>
|
||||
<Button clicked={props.dismissInfo}>Dismiss</Button>
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user