mirror of
https://github.com/YunoHost/yunohost-portal.git
synced 2024-09-03 20:06:23 +02:00
add iconClass prop to button
This commit is contained in:
parent
36174cbb8b
commit
98b10175e0
2 changed files with 10 additions and 3 deletions
|
@ -36,12 +36,12 @@ function onAdd() {
|
|||
class="mb-3"
|
||||
sr-hide-label
|
||||
>
|
||||
<div class="join">
|
||||
<div class="join w-full">
|
||||
<TextInput
|
||||
:name="`${name}[${idx}]`"
|
||||
:type="type"
|
||||
:placeholder="placeholder"
|
||||
class="join-item"
|
||||
class="join-item w-full"
|
||||
/>
|
||||
<YButton
|
||||
variant="error"
|
||||
|
|
|
@ -15,6 +15,7 @@ const props = withDefaults(
|
|||
variant: 'primary',
|
||||
icon: undefined,
|
||||
iconSize: '1.5em',
|
||||
iconClass: '',
|
||||
iconOnly: false,
|
||||
block: false,
|
||||
},
|
||||
|
@ -37,7 +38,13 @@ const variantClass = computed(() => {
|
|||
:type="type"
|
||||
>
|
||||
<slot name="default">
|
||||
<Icon v-if="icon" :name="icon" :size="iconSize" aria-hidden="true" />
|
||||
<Icon
|
||||
v-if="icon"
|
||||
:name="icon"
|
||||
:size="iconSize"
|
||||
:class="iconClass"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span :class="{ 'sr-only': iconOnly }">{{ text }}</span>
|
||||
</slot>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Reference in a new issue