mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-16 09:38:38 +01:00
new selfhosted version
This commit is contained in:
31
dashboard/components/ui/stepper/StepperIndicator.vue
Normal file
31
dashboard/components/ui/stepper/StepperIndicator.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<script lang="ts" setup>
|
||||
import type { StepperIndicatorProps } from 'reka-ui'
|
||||
import type { HTMLAttributes } from 'vue'
|
||||
import { reactiveOmit } from '@vueuse/core'
|
||||
import { StepperIndicator, useForwardProps } from 'reka-ui'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
const props = defineProps<StepperIndicatorProps & { class?: HTMLAttributes['class'] }>()
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class')
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperIndicator
|
||||
v-bind="forwarded"
|
||||
:class="cn(
|
||||
'inline-flex items-center justify-center rounded-full text-muted-foreground/50 w-8 h-8',
|
||||
// Disabled
|
||||
'group-data-[disabled]:text-muted-foreground group-data-[disabled]:opacity-50',
|
||||
// Active
|
||||
'group-data-[state=active]:bg-primary group-data-[state=active]:text-primary-foreground',
|
||||
// Completed
|
||||
'group-data-[state=completed]:bg-accent group-data-[state=completed]:text-accent-foreground',
|
||||
props.class,
|
||||
)"
|
||||
>
|
||||
<slot />
|
||||
</StepperIndicator>
|
||||
</template>
|
||||
Reference in New Issue
Block a user