Skip to content

Commit

Permalink
feat(form): use link buttons for redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Jun 8, 2022
1 parent 0a24669 commit 2ae6bbb
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 16 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions nuxt/components/ImageUploadGallery.vue
Expand Up @@ -100,13 +100,15 @@
</div>
</Card>
<div v-else class="flex flex-col gap-1 py-2">
<p class="text-center">{{ $t('noPictures') }}</p>
<ButtonColored
:aria-label="$t('uploadImages')"
:to="localePath('/upload')"
>
{{ $t('uploadImages') }}
</ButtonColored>
<!-- <p class="text-center">{{ $t('noPictures') }}</p> -->
<div class="flex justify-center">
<Button :aria-label="$t('uploadImages')" :to="localePath('/upload')">
{{ $t('uploadImages') }}
<template slot="suffix">
<IconArrowRight />
</template>
</Button>
</div>
</div>
<Modal
id="ModalImageUploadGallery"
Expand Down
2 changes: 2 additions & 0 deletions nuxt/components/button/Button.vue
Expand Up @@ -11,6 +11,7 @@
>
<slot name="prefix" />
<slot />
<slot name="suffix" />
</AppLink>
<button
v-else
Expand All @@ -23,6 +24,7 @@
>
<slot name="prefix" />
<slot />
<slot name="suffix" />
</button>
</template>

Expand Down
3 changes: 3 additions & 0 deletions nuxt/components/button/ButtonColored.vue
Expand Up @@ -30,6 +30,9 @@
<template slot="prefix">
<slot name="prefix" />
</template>
<template slot="suffix">
<slot name="suffix" />
</template>
</Button>
</div>
</div>
Expand Down
17 changes: 8 additions & 9 deletions nuxt/components/form/invitation/FormInvitation.vue
Expand Up @@ -56,15 +56,14 @@
<ContactPreview class="px-4 py-2" :contact="contact" />
</Button>
</div>
<ButtonColored
:aria-label="$t('contactsAdd')"
:to="localePath('/contact')"
>
{{ $t('contactsAdd') }}
<template slot="prefix">
<IconPlus />
</template>
</ButtonColored>
<div class="flex justify-center">
<Button :aria-label="$t('contactsAdd')" :to="localePath('/contact')">
{{ $t('contactsAdd') }}
<template slot="suffix">
<IconArrowRight />
</template>
</Button>
</div>
</div>
<template slot="assistance">
<FormInputStateInfo>
Expand Down
29 changes: 29 additions & 0 deletions nuxt/components/icon/IconArrowRight.vue
@@ -0,0 +1,29 @@
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
:class="classes"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M14 5l7 7m0 0l-7 7m7-7H3"
/>
</svg>
</template>

<script lang="ts">
import { defineComponent } from '#app'
export default defineComponent({
props: {
classes: {
default: 'h-5 md:h-6 w-5 md:w-6',
type: String,
},
},
})
</script>

0 comments on commit 2ae6bbb

Please sign in to comment.