2023-07-11 10:38:21 +03:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import UiIcon from './Icon.vue'
|
|
|
|
|
|
|
|
|
|
// Props.
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
label?: string
|
|
|
|
|
type?: 'button' | 'submit'
|
|
|
|
|
color?: string
|
|
|
|
|
icon?: any
|
|
|
|
|
}>()
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-07-26 14:07:17 +03:00
|
|
|
<button class="ui-btn" :class="props.color" :type="props.type">
|
2023-07-11 10:38:21 +03:00
|
|
|
<ui-icon v-if="props.icon" :name="props.icon" />
|
|
|
|
|
<div v-if="props.label" class="label">{{ props.label }}</div>
|
2023-07-26 14:07:17 +03:00
|
|
|
<slot v-if="$slots.default" name="default" />
|
2023-07-11 10:38:21 +03:00
|
|
|
</button>
|
|
|
|
|
</template>
|