2
0

💄 (js) Improve popup ui consistency

This commit is contained in:
Baptiste Arnaud
2023-05-23 18:01:49 +02:00
parent 423aca6133
commit c950406997
4 changed files with 34 additions and 9 deletions

View File

@ -107,17 +107,26 @@ export const Popup = (props: PopupProps) => {
<Show when={isBotOpened()}>
<style>{styles}</style>
<div
class="relative z-10"
class="relative"
aria-labelledby="modal-title"
role="dialog"
aria-modal="true"
style={{
'z-index': 42424242,
}}
>
<style>{styles}</style>
<div class="fixed inset-0 bg-black bg-opacity-50 transition-opacity animate-fade-in" />
<div
class="fixed inset-0 bg-black bg-opacity-50 transition-opacity animate-fade-in"
part="overlay"
/>
<div class="fixed inset-0 z-10 overflow-y-auto">
<div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0">
<div
class="relative h-[80vh] transform overflow-hidden rounded-lg text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"
class={
'relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 sm:w-full sm:max-w-lg' +
(props.theme?.backgroundColor ? ' shadow-xl' : '')
}
style={{
'background-color':
props.theme?.backgroundColor ?? 'transparent',