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"
|
class="mb-3"
|
||||||
sr-hide-label
|
sr-hide-label
|
||||||
>
|
>
|
||||||
<div class="join">
|
<div class="join w-full">
|
||||||
<TextInput
|
<TextInput
|
||||||
:name="`${name}[${idx}]`"
|
:name="`${name}[${idx}]`"
|
||||||
:type="type"
|
:type="type"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
class="join-item"
|
class="join-item w-full"
|
||||||
/>
|
/>
|
||||||
<YButton
|
<YButton
|
||||||
variant="error"
|
variant="error"
|
||||||
|
|
|
@ -15,6 +15,7 @@ const props = withDefaults(
|
||||||
variant: 'primary',
|
variant: 'primary',
|
||||||
icon: undefined,
|
icon: undefined,
|
||||||
iconSize: '1.5em',
|
iconSize: '1.5em',
|
||||||
|
iconClass: '',
|
||||||
iconOnly: false,
|
iconOnly: false,
|
||||||
block: false,
|
block: false,
|
||||||
},
|
},
|
||||||
|
@ -37,7 +38,13 @@ const variantClass = computed(() => {
|
||||||
:type="type"
|
: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"
|
||||||
|
:class="iconClass"
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
<span :class="{ 'sr-only': iconOnly }">{{ text }}</span>
|
<span :class="{ 'sr-only': iconOnly }">{{ text }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue