✨ feature: Added Group component
This commit is contained in:
parent
5ec057c34b
commit
d5903668ba
34
src/components/group/VGroup.vue
Normal file
34
src/components/group/VGroup.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script setup lang="ts">
|
||||
import type IVGroup from './IVGroup.type';
|
||||
|
||||
const props = withDefaults(defineProps<IVGroup>(), {
|
||||
type: 'default',
|
||||
disabled: false,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="['container', {
|
||||
'error': type === 'error',
|
||||
'success': type === 'success',
|
||||
'disabled': props.disabled,
|
||||
}]"
|
||||
>
|
||||
<slot></slot>
|
||||
</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>
|
Loading…
Reference in New Issue
Block a user