Skip to content

Commit feec1be

Browse files
committed
Revert adding |local to Dialog / Drawer / Backdrop as it breaks ToggleButton usage (issue #51)
1 parent ef3f807 commit feec1be

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/lib/components/Backdrop.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
export let fadeParams: FadeParams = { duration: 300 };
1010
</script>
1111

12+
<!-- TODO: Add `|local` to transition without breaking `ToggleButton` usage: https://github.com/techniq/svelte-ux/issues/51 -->
1213
<div
1314
class="backdrop fixed top-0 bottom-0 left-0 right-0 flex items-center
1415
justify-center bg-black/50 {$$restProps.class || ''}"
@@ -18,7 +19,7 @@
1819
on:click
1920
on:mousedown
2021
on:mouseup
21-
transition:fade|local={fadeParams}
22+
transition:fade={fadeParams}
2223
class:blur
2324
use:portalAction={{ enabled: portal }}
2425
>

src/lib/components/Dialog.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@
9191
}}
9292
use:portalAction={{ enabled: portal }}
9393
>
94+
<!-- TODO: Add `|local` to transition without breaking `ToggleButton` usage: https://github.com/techniq/svelte-ux/issues/51 -->
9495
<div
9596
class={cls(
9697
'dialog rounded bg-white elevation-4 overflow-y-auto pointer-events-auto relative outline-none',
9798
classes.dialog,
9899
$$props.class
99100
)}
100101
style={$$props.style}
101-
transition:scale|local={{ duration: 150, easing: quadIn }}
102+
transition:scale={{ duration: 150, easing: quadIn }}
102103
on:introstart
103104
on:outrostart
104105
on:introend

src/lib/components/Drawer.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
{portal}
4343
/>
4444

45+
<!-- TODO: Add `|local` to transition without breaking `ToggleButton` usage: https://github.com/techniq/svelte-ux/issues/51 -->
4546
<div
4647
class={cls(
4748
'bg-white fixed overflow-auto transform z-50 outline-none',
@@ -56,7 +57,7 @@
5657
$$props.class
5758
)}
5859
style={$$props.style}
59-
transition:fly|local={{
60+
transition:fly={{
6061
x: left ? '-100%' : right ? '100%' : 0,
6162
y: top ? '-100%' : bottom ? '100%' : 0,
6263
}}

0 commit comments

Comments
 (0)