Prettier support
This commit is contained in:
@@ -1,41 +1,59 @@
|
||||
import {connect} from 'react-redux';
|
||||
import { connect } from 'react-redux';
|
||||
import Button from '../UI/Button/Button';
|
||||
import Box from '../UI/Box/Box';
|
||||
import React from 'react';
|
||||
import './YesNo.css';
|
||||
import {hideConfirmYesNo} from '../../redux/actions/common_actions';
|
||||
import { hideConfirmYesNo } from '../../redux/actions/common_actions';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
Title: state.common.ConfirmTitle,
|
||||
}
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
hideConfirmYesNo: confirmed => dispatch(hideConfirmYesNo(confirmed)),
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
hideConfirmYesNo: (confirmed) => dispatch(hideConfirmYesNo(confirmed)),
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)((props) => {
|
||||
return (
|
||||
<Box dxStyle={{minWidth: '180px', height: 'auto', padding: 'var(--default_spacing)'}}>
|
||||
<div style={{width: '100%', height: 'auto'}}>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>{props.Title}</h1>
|
||||
<Box
|
||||
dxStyle={{
|
||||
minWidth: '180px',
|
||||
height: 'auto',
|
||||
padding: 'var(--default_spacing)',
|
||||
}}
|
||||
>
|
||||
<div style={{ width: '100%', height: 'auto' }}>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>{props.Title}</h1>
|
||||
</div>
|
||||
<table cellSpacing={5} width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<Button buttonStyles={{width: '100%'}}
|
||||
clicked={() => props.hideConfirmYesNo(true)}>Yes</Button>
|
||||
<Button
|
||||
buttonStyles={{ width: '100%' }}
|
||||
clicked={() => props.hideConfirmYesNo(true)}
|
||||
>
|
||||
Yes
|
||||
</Button>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<Button buttonStyles={{width: '100%'}}
|
||||
clicked={() => props.hideConfirmYesNo(false)}>No</Button>
|
||||
<Button
|
||||
buttonStyles={{ width: '100%' }}
|
||||
clicked={() => props.hideConfirmYesNo(false)}
|
||||
>
|
||||
No
|
||||
</Button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</Box>);
|
||||
});
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user