Modal style fixes

This commit is contained in:
kvakazyambra 2023-10-04 00:52:38 +03:00
parent 95d2f79ef8
commit b0b0136f34
3 changed files with 58 additions and 30 deletions

View File

@ -87,14 +87,20 @@
.disclaimer { .disclaimer {
@include font-size(1.2rem); @include font-size(1.2rem);
color: #9fa1a7; color: #9fa1a7;
margin-bottom: 0; margin-bottom: 0;
a {
color: #fff !important;
&:hover {
color: rgb(255, 255, 255, 0.6) !important;
}
}
} }
.authActions { .authActions {
@include font-size(1.5rem); @include font-size(1.5rem);
margin-top: 1.6rem; margin-top: 1.6rem;
text-align: center; text-align: center;

View File

@ -16,18 +16,16 @@
.modal { .modal {
background: #fff; background: #fff;
max-width: 1000px; max-width: 1000px;
padding: 5.4rem 2.4rem 2.4rem;
position: relative; position: relative;
width: 100%; width: 100%;
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
padding: 4.2rem;
width: 80%; width: 80%;
} }
.close { .close {
position: absolute; position: absolute;
top: 1.6rem; top: 2rem;
cursor: pointer; cursor: pointer;
height: 18px; height: 18px;
width: 16px; width: 16px;
@ -38,7 +36,7 @@
z-index: 1; z-index: 1;
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
right: 1.6rem; right: 2rem;
} }
&:hover { &:hover {
@ -74,11 +72,32 @@
} }
} }
.modalInner {
overflow: auto;
padding: 5.4rem 2.4rem 2.4rem;
position: relative;
@include media-breakpoint-up(sm) {
padding: 5rem;
}
}
.noPadding { .noPadding {
background: none; background: none;
left: 50%;
padding: 0;
transform: translateX(-50%);
.modalInner {
padding: 0 2rem; padding: 0 2rem;
} }
.close {
right: 2rem;
top: 2rem;
}
}
.maxHeight { .maxHeight {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -10,7 +10,7 @@ import { router } from '../../../stores/router'
interface Props { interface Props {
name: string name: string
variant: 'narrow' | 'wide' variant: 'narrow' | 'wide' | 'medium'
children: JSX.Element children: JSX.Element
onClose?: () => void onClose?: () => void
noPadding?: boolean noPadding?: boolean
@ -43,15 +43,17 @@ export const Modal = (props: Props) => {
return ( return (
<Show when={visible()}> <Show when={visible()}>
<div class={styles.backdrop} onClick={handleHide}> <div class={styles.backdrop} onClick={handleHide}>
<div className="wide-container">
<div <div
class={clsx(styles.modal, { class={clsx(styles.modal, {
[styles.narrow]: props.variant === 'narrow', [styles.narrow]: props.variant === 'narrow',
['col-auto col-md-20 offset-md-2 col-lg-14 offset-lg-5']: props.variant === 'medium',
[styles.noPadding]: props.noPadding, [styles.noPadding]: props.noPadding,
[styles.maxHeight]: props.maxHeight [styles.maxHeight]: props.maxHeight
})} })}
onClick={(event) => event.stopPropagation()} onClick={(event) => event.stopPropagation()}
> >
{props.children} <div class={styles.modalInner}>{props.children}</div>
<div class={styles.close} onClick={handleHide}> <div class={styles.close} onClick={handleHide}>
<svg <svg
class={styles.icon} class={styles.icon}
@ -68,6 +70,7 @@ export const Modal = (props: Props) => {
</div> </div>
</div> </div>
</div> </div>
</div>
</Show> </Show>
) )
} }