visua-vue/src/components/group/VGroup.vue

35 lines
700 B
Vue
Raw Normal View History

2025-07-21 18:12:47 +02:00
<script setup lang="ts">
import type IVGroup from './IVGroup.type';
const props = withDefaults(defineProps<IVGroup>(), {
type: 'default',
disabled: false,
})
</script>
<template>
<div :class="['container', {
2025-07-21 18:15:18 +02:00
'error': type === 'error',
'success': type === 'success',
'disabled': props.disabled,
}]"
2025-07-21 18:12:47 +02:00
>
2025-07-21 18:15:18 +02:00
<slot/>
2025-07-21 18:12:47 +02:00
</div>
</template>
<style lang="css" scoped>
.container {
width: 100%;
height: fit-content;
display: flex;
flex-direction: column;
align-items: start;
padding: 0 0 0 0.75rem;
}
.container.error {border-left: 2px solid var(--border-plain-error);}
.container.success {border-left: 2px solid var(--border-plain-success);}
.container.disabled {border: none;}
</style>