feat: add initial application structure with configuration, UI components, and state management
This commit is contained in:
parent
fadf94002c
commit
0af6b17792
56 changed files with 6137 additions and 129 deletions
41
components/RiskBandChip.vue
Normal file
41
components/RiskBandChip.vue
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<UBadge
|
||||
:color="badgeColor"
|
||||
:variant="variant"
|
||||
:size="size"
|
||||
>
|
||||
{{ displayText }}
|
||||
</UBadge>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
type RiskBand = 'Low' | 'Medium' | 'High'
|
||||
|
||||
interface Props {
|
||||
risk: RiskBand
|
||||
variant?: 'solid' | 'outline' | 'soft' | 'subtle'
|
||||
size?: 'xs' | 'sm' | 'md' | 'lg'
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
variant: 'subtle',
|
||||
size: 'sm'
|
||||
})
|
||||
|
||||
const badgeColor = computed(() => {
|
||||
switch (props.risk) {
|
||||
case 'Low':
|
||||
return 'green'
|
||||
case 'Medium':
|
||||
return 'yellow'
|
||||
case 'High':
|
||||
return 'red'
|
||||
default:
|
||||
return 'gray'
|
||||
}
|
||||
})
|
||||
|
||||
const displayText = computed(() => {
|
||||
return `${props.risk} Risk`
|
||||
})
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue