mirror of
https://github.com/YunoHost/yunohost-portal.git
synced 2024-09-03 20:06:23 +02:00
YButton update type
prop
This commit is contained in:
parent
cbe3a5d641
commit
746fdafa9c
1 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
type?: HTMLButtonElement['type']
|
type?: 'button' | 'submit' | 'reset'
|
||||||
text?: string
|
text?: string
|
||||||
variant?: string
|
variant?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
|
@ -31,7 +31,11 @@ const variantClass = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<button class="btn" :class="[variantClass, { 'btn-block': block }]">
|
<button
|
||||||
|
class="btn"
|
||||||
|
:class="[variantClass, { 'btn-block': block }]"
|
||||||
|
:type="type"
|
||||||
|
>
|
||||||
<slot name="default">
|
<slot name="default">
|
||||||
<Icon v-if="icon" :name="icon" :size="iconSize" aria-hidden="true" />
|
<Icon v-if="icon" :name="icon" :size="iconSize" aria-hidden="true" />
|
||||||
<span :class="{ 'sr-only': iconOnly }">{{ text }}</span>
|
<span :class="{ 'sr-only': iconOnly }">{{ text }}</span>
|
||||||
|
|
Loading…
Reference in a new issue