diff options
Diffstat (limited to 'src/ui/c-alert/c-alert.vue')
-rw-r--r-- | src/ui/c-alert/c-alert.vue | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/c-alert/c-alert.vue b/src/ui/c-alert/c-alert.vue index 1fedbb0..607acb9 100644 --- a/src/ui/c-alert/c-alert.vue +++ b/src/ui/c-alert/c-alert.vue @@ -1,3 +1,13 @@ +<script lang="ts" setup> +import { useTheme } from './c-alert.theme'; + +const props = withDefaults(defineProps<{ type?: 'warning' }>(), { type: 'warning' }); +const { type } = toRefs(props); + +const theme = useTheme(); +const variantTheme = computed(() => theme.value[type.value]); +</script> + <template> <div class="c-alert" flex items-center b-rd-4px pa-5> <div class="c-alert--icon" mr-4 text-40px op-60> @@ -12,16 +22,6 @@ </div> </template> -<script lang="ts" setup> -import { useTheme } from './c-alert.theme'; - -const props = withDefaults(defineProps<{ type?: 'warning' }>(), { type: 'warning' }); -const { type } = toRefs(props); - -const theme = useTheme(); -const variantTheme = computed(() => theme.value[type.value]); -</script> - <style lang="less" scoped> .c-alert { background-color: v-bind('variantTheme.backgroundColor'); |