Files
BewlyBewly/src/components/Progress.vue
2023-01-29 03:34:14 +08:00

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>