mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
27 lines
501 B
Vue
27 lines
501 B
Vue
<script setup lang="ts">
|
|
interface Props {
|
|
percentage: number
|
|
color?: string
|
|
height?: number | string
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
color: 'var(--bew-theme-color)',
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
h="6px"
|
|
rounded="$bew-radius"
|
|
:style="{
|
|
width: `${percentage}%`,
|
|
backgroundColor: props.color,
|
|
height:
|
|
typeof props.height === 'number' ? `${props.height}px` : props.height,
|
|
}"
|
|
/>
|
|
</template>
|
|
|
|
<style lang="scss" scoped></style>
|