Prettified Code!
This commit is contained in:
parent
57674206b2
commit
2aa8b70ead
@ -573,7 +573,12 @@ export default class App extends Component {
|
|||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
// modal component
|
// modal component
|
||||||
const externalActionModal = externalAction && html`<${ExternalActionModal} action=${externalAction} onClose=${this.closeExternalActionModal} />`;
|
const externalActionModal =
|
||||||
|
externalAction &&
|
||||||
|
html`<${ExternalActionModal}
|
||||||
|
action=${externalAction}
|
||||||
|
onClose=${this.closeExternalActionModal}
|
||||||
|
/>`;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div
|
<div
|
||||||
|
@ -24,7 +24,7 @@ export default class ExternalActionModal extends Component {
|
|||||||
onClose: this.props.onClose,
|
onClose: this.props.onClose,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("micromodal error: ", e);
|
console.log('micromodal error: ', e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,21 +38,43 @@ export default class ExternalActionModal extends Component {
|
|||||||
const { action } = this.props;
|
const { action } = this.props;
|
||||||
const { url, title, description } = action;
|
const { url, title, description } = action;
|
||||||
const { iframeLoaded } = this.state;
|
const { iframeLoaded } = this.state;
|
||||||
const iframeStyle = iframeLoaded ? null : {
|
const iframeStyle = iframeLoaded
|
||||||
backgroundImage: 'url(/img/loading.gif)',
|
? null
|
||||||
};
|
: {
|
||||||
|
backgroundImage: 'url(/img/loading.gif)',
|
||||||
|
};
|
||||||
return html`
|
return html`
|
||||||
<div class="modal micromodal-slide" id="external-actions-modal" aria-hidden="true">
|
<div
|
||||||
|
class="modal micromodal-slide"
|
||||||
|
id="external-actions-modal"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
||||||
<div id="modal-container" class="modal__container rounded-md" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
|
<div
|
||||||
<header id="modal-header" class="modal__header flex flex-row justify-between items-center bg-gray-300 p-3 rounded-t-md">
|
id="modal-container"
|
||||||
|
class="modal__container rounded-md"
|
||||||
|
role="dialog"
|
||||||
|
aria-modal="true"
|
||||||
|
aria-labelledby="modal-1-title"
|
||||||
|
>
|
||||||
|
<header
|
||||||
|
id="modal-header"
|
||||||
|
class="modal__header flex flex-row justify-between items-center bg-gray-300 p-3 rounded-t-md"
|
||||||
|
>
|
||||||
<h2 class="modal__title text-indigo-600 font-semibold">
|
<h2 class="modal__title text-indigo-600 font-semibold">
|
||||||
${title || description}
|
${title || description}
|
||||||
</h2>
|
</h2>
|
||||||
<button class="modal__close" aria-label="Close modal" data-micromodal-close></button>
|
<button
|
||||||
|
class="modal__close"
|
||||||
|
aria-label="Close modal"
|
||||||
|
data-micromodal-close
|
||||||
|
></button>
|
||||||
</header>
|
</header>
|
||||||
<div id="modal-content-content" class="modal-content-content">
|
<div id="modal-content-content" class="modal-content-content">
|
||||||
<div id="modal-content" class="modal__content text-gray-600 rounded-b-md overflow-y-auto overflow-x-hidden">
|
<div
|
||||||
|
id="modal-content"
|
||||||
|
class="modal__content text-gray-600 rounded-b-md overflow-y-auto overflow-x-hidden"
|
||||||
|
>
|
||||||
<iframe
|
<iframe
|
||||||
id="external-modal-iframe"
|
id="external-modal-iframe"
|
||||||
style=${iframeStyle}
|
style=${iframeStyle}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user