parent
620be4a9e1
commit
0158b6fc1b
2 changed files with 13 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<i class="ph-arrow-square-out ph-bold ph-lg"></i>
|
||||
</span>
|
||||
</a>
|
||||
<MkA v-else :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
|
||||
<MkA v-else-if="to" :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
|
||||
<span :class="$style.icon"><slot name="icon"></slot></span>
|
||||
<span :class="$style.text"><slot></slot></span>
|
||||
<span :class="$style.suffix">
|
||||
|
|
@ -21,6 +21,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<i class="ph-caret-right ph-bold ph-lg"></i>
|
||||
</span>
|
||||
</MkA>
|
||||
<a v-else-if="onClick" :class="[$style.main, { [$style.active]: active }]" class="_button" :behavior="behavior" @click="onClick">
|
||||
<span :class="$style.icon"><slot name="icon"></slot></span>
|
||||
<span :class="$style.text"><slot></slot></span>
|
||||
<span :class="$style.suffix">
|
||||
<span :class="$style.suffixText"><slot name="suffix"></slot></span>
|
||||
<i class="ph-caret-right ph-bold ph-lg"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -28,9 +36,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import { } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
to: string;
|
||||
to?: string;
|
||||
active?: boolean;
|
||||
external?: boolean;
|
||||
onClick?: () => void;
|
||||
behavior?: null | 'window' | 'browser';
|
||||
inline?: boolean;
|
||||
}>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue