-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make cancel buttons go back one level
- Loading branch information
1 parent
4be6e7b
commit 1dcc4a5
Showing
3 changed files
with
42 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,16 @@ | ||
<script lang="ts"> | ||
import type { ActionData } from '$lib/types'; | ||
import type { AutoActionData } from '$lib/types'; | ||
import Action from './Action.svelte'; | ||
let { | ||
actions = $bindable(), | ||
displaying = $bindable() | ||
}: { actions: ActionData[]; displaying: boolean } = $props(); | ||
// let latestActions: ActionData[] = $derived(actions.toReversed().slice(0, 5)); | ||
let { actions = $bindable() }: { actions: AutoActionData[] } = $props(); | ||
// let latestActions: AutoActionData[] = $derived(actions.toReversed().slice(0, 5)); | ||
</script> | ||
|
||
<h1 class="text-text_red">Timeline</h1> | ||
<div | ||
class="flex flex-col items-center bg-btn_grey text-text_white p-1 rounded-t-lg transition-transform gap-2 fixed h-[50svh] inset-x-0 bottom-0 | ||
{displaying ? '' : 'translate-y-full'}" | ||
id="timeline" | ||
> | ||
<button | ||
class="bg-btn_grey w-80 p-1 rounded border-2 border-outline_gray fixed bottom-0" | ||
onclick={() => { | ||
displaying = false; | ||
{#each actions as _, i} | ||
<Action | ||
bind:action={actions[i]} | ||
deleteself={() => { | ||
actions.splice(actions.indexOf(actions[i]), 1); | ||
}} | ||
> | ||
Hide Timeline | ||
</button> | ||
|
||
{#each actions as _, i} | ||
<Action | ||
bind:action={actions[i]} | ||
deleteself={() => { | ||
actions.splice(actions.indexOf(actions[i]), 1); | ||
}} | ||
/> | ||
{/each} | ||
</div> | ||
/> | ||
{/each} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters