Linter fixes
This commit is contained in:
parent
7cfd9d4fd0
commit
313e675654
|
@ -1,7 +1,9 @@
|
|||
.popup {
|
||||
background: #fff;
|
||||
border: 2px solid #000;
|
||||
|
||||
@include font-size(1.6rem);
|
||||
|
||||
padding: 2.4rem 2.4rem 2.4rem 1.6rem;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
|
|
|
@ -12,10 +12,6 @@ interface PopupProps {
|
|||
export const Popup = (props: PopupProps) => {
|
||||
const { getModal } = useModalStore()
|
||||
|
||||
const wrapClick = (ev: Event) => {
|
||||
if ((ev.target as HTMLElement).classList.contains('popup')) hideModal()
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('keydown', (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') hideModal()
|
||||
|
@ -29,7 +25,7 @@ export const Popup = (props: PopupProps) => {
|
|||
|
||||
return (
|
||||
<Show when={visible()}>
|
||||
<div class={clsx(style.popup, props.class)} onClick={wrapClick}>
|
||||
<div class={clsx(style.popup, props.class)}>
|
||||
{props.children}
|
||||
</div>
|
||||
</Show>
|
||||
|
|
Loading…
Reference in New Issue
Block a user