mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-28 23:01:37 +00:00
28 lines
504 B
Vue
28 lines
504 B
Vue
<script setup lang="ts">
|
|
defineOptions({ inheritAttrs: false })
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
component?: string
|
|
small?: boolean
|
|
tone?: 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning'
|
|
}>(),
|
|
{
|
|
component: 'span',
|
|
small: false,
|
|
tone: 'primary',
|
|
},
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<component
|
|
:is="component"
|
|
v-bind="$attrs"
|
|
class="sky-badge"
|
|
:class="[`sky-badge--${tone}`, { 'sky-badge--small': small }]"
|
|
>
|
|
<slot />
|
|
</component>
|
|
</template>
|