forked from coracle/flotilla
linting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import {sleep} from '@welshman/lib'
|
||||
import {sleep} from "@welshman/lib"
|
||||
|
||||
export let delay = 1
|
||||
</script>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<script lang="ts">
|
||||
import {noop} from '@welshman/lib'
|
||||
import {noop} from "@welshman/lib"
|
||||
import {fade, fly} from "@lib/transition"
|
||||
|
||||
export let onClose: any = noop
|
||||
export let fullscreen = false
|
||||
|
||||
$: extraClass = !fullscreen && "card2 bg-alt max-h-[90vh] w-[90vw] overflow-auto text-base-content sm:w-[520px]"
|
||||
$: extraClass =
|
||||
!fullscreen && "card2 bg-alt max-h-[90vh] w-[90vw] overflow-auto text-base-content sm:w-[520px]"
|
||||
</script>
|
||||
|
||||
<div class="center fixed inset-0 z-modal">
|
||||
@@ -13,7 +14,7 @@
|
||||
class="absolute inset-0 cursor-pointer bg-black opacity-75"
|
||||
transition:fade={{duration: 300}}
|
||||
on:click={onClose} />
|
||||
<div class="relative scroll-container {extraClass}" transition:fly={{duration: 300}}>
|
||||
<div class="scroll-container relative {extraClass}" transition:fly={{duration: 300}}>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="max-h-screen flex-grow overflow-auto bg-base-200 pb-14 sm:pb-0 scroll-container">
|
||||
<div class="scroll-container max-h-screen flex-grow overflow-auto bg-base-200 pb-14 sm:pb-0">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
popover = tippy(element, {
|
||||
content: target,
|
||||
animation: "shift-away",
|
||||
appendTo: document.querySelector('.tippy-target')!,
|
||||
appendTo: document.querySelector(".tippy-target")!,
|
||||
...params,
|
||||
})
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
} from "@welshman/app"
|
||||
import Avatar from "@lib/components/Avatar.svelte"
|
||||
import WotScore from "@lib/components/WotScore.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushDrawer} from "@app/modal"
|
||||
|
||||
export let value
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ export const createScroller = ({
|
||||
let done = false
|
||||
|
||||
const check = async () => {
|
||||
const container = element.closest('.scroll-container')
|
||||
const container = element.closest(".scroll-container")
|
||||
|
||||
if (container) {
|
||||
// While we have empty space, fill it
|
||||
|
||||
@@ -9,8 +9,8 @@ export const fly = (node: Element, params?: FlyParams | undefined) =>
|
||||
baseFly(node, {y: 20, ...params})
|
||||
|
||||
export type TranslateParams = {
|
||||
delay?: number,
|
||||
duration?: number,
|
||||
delay?: number
|
||||
duration?: number
|
||||
easing?: (t: number) => number
|
||||
axis?: "x" | "y"
|
||||
reverse?: boolean
|
||||
@@ -18,7 +18,7 @@ export type TranslateParams = {
|
||||
|
||||
export const translate = (
|
||||
node: Element,
|
||||
{delay = 0, duration = 400, easing = cubicOut, axis = "y", reverse = false}: TranslateParams = {}
|
||||
{delay = 0, duration = 400, easing = cubicOut, axis = "y", reverse = false}: TranslateParams = {},
|
||||
) => {
|
||||
return {
|
||||
delay,
|
||||
@@ -32,7 +32,7 @@ export const translate = (
|
||||
} else {
|
||||
return `transform: translateY(${p})`
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,5 +75,6 @@ export function slideAndFade(
|
||||
}
|
||||
}
|
||||
|
||||
export const conditionalTransition = (condition: any, transition: any) =>
|
||||
(node: any, args?: any) => condition ? transtion(node, args) : null
|
||||
export const conditionalTransition =
|
||||
(condition: any, transition: any) => (node: any, args?: any) =>
|
||||
condition ? transtion(node, args) : null
|
||||
|
||||
Reference in New Issue
Block a user