Fix email test button (#1076)

This commit is contained in:
LautaroCesso 2021-11-05 14:44:31 -03:00 committed by GitHub
parent 7015e21966
commit 018863ab3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

View File

@ -11,7 +11,7 @@ class ModalContainer extends React.Component {
static openModal(
content,
options={noPadding: false, outsideClick: false, closeButton: {showCloseButton: false, whiteColor: false}}
) {
) {
store.dispatch(
ModalActions.openModal({
content,

View File

@ -16,7 +16,7 @@ class PopupMessage extends React.Component {
static open(props) {
ModalContainer.openModal(
<PopupMessage {...props} />,
{noPadding: true, outsideClick: true}
{noPadding: true, outsideClick: true, closeButton: {showCloseButton: false, whiteColor: false}}
);
}
@ -27,7 +27,7 @@ class PopupMessage extends React.Component {
render() {
return (
<div className="popup-message">
<Message {...this.props} className="popup-message__message" />
<Message {...this.props} showCloseButton={false} className="popup-message__message" />
<Button
className="popup-message__close-button"
iconName="times"

View File

@ -5,6 +5,7 @@ import { connect } from 'react-redux'
import DocumentTitle from 'react-document-title';
import history from 'lib-app/history';
import ModalContainer from 'app-components/modal-container';
const level2Paths = [
'/admin/panel/tickets/custom-responses',
@ -38,6 +39,7 @@ class App extends React.Component {
<div className="application__content">
{React.cloneElement(this.props.children, {})}
</div>
<ModalContainer />
</div>
</DocumentTitle>
);

View File

@ -15,7 +15,8 @@ class Message extends React.Component {
static defaultProps = {
type: 'info',
leftAligned: false
leftAligned: false,
showCloseButton: true
};
state = {
@ -46,14 +47,14 @@ class Message extends React.Component {
}
renderMessageContent(style) {
const { children, title } = this.props;
const { children, title, showCloseButton } = this.props;
return (
<div className={this.getClass()} style={style} aria-live="assertive">
<Icon className="message__icon" name={this.getIconName()} size={this.getIconSize()} />
<div className="message__title">{title}</div>
<div className="message__content">{children}</div>
{this.renderCloseButton()}
{showCloseButton ? this.renderCloseButton() : null}
</div>
)
}