fix(frontend): various small fixes

This commit is contained in:
Ruben Fiszel
2022-09-29 22:50:12 +02:00
parent d8cd950952
commit d394edf44f
3 changed files with 11 additions and 4 deletions

View File

@@ -20,7 +20,7 @@
}
export let initialOpen: number | undefined = undefined
let flowFiltered = {
$: flowFiltered = {
summary: flow.summary,
description: flow.description,
value: flow.value,

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import { goto } from '$app/navigation'
import { classNames } from '$lib/utils'
import Icon from 'svelte-awesome'
import type { Button } from './model'
@@ -80,7 +81,13 @@
</script>
{#if href}
<a {href} {target} tabindex={disabled ? -1 : 0} on:click|stopPropagation {...buttonProps}>
<button
type="button"
on:click|stopPropagation={() => goto(href ?? '#')}
{target}
tabindex={disabled ? -1 : 0}
{...buttonProps}
>
{#if startIcon}
<Icon
data={startIcon.icon}
@@ -98,7 +105,7 @@
scale={iconScale[size]}
/>
{/if}
</a>
</button>
{:else}
<button type="button" on:click|stopPropagation {...buttonProps}>
{#if startIcon}

View File

@@ -19,7 +19,7 @@
class="inline-flex space-x-2 space-x-reverse flex-row-reverse w-full bottom-4 right-4 flex-wrap"
>
<button
on:click|stopPropagation={() => goto(`/flows/edit/${flow.path}?step=2`)}
on:click|stopPropagation={() => goto(`/flows/edit/${flow.path}`)}
type="button"
class="inline-flex items-center text-gray-700 bg-transparent border border-gray-700 hover:bg-gray-800 hover:text-white focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 text-center"
data-dismiss-target="#alert-additional-content-5"