mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-08 07:11:03 -04:00
update(c-alert): Add variant 'error'
This commit is contained in:
parent
b2ad4f7a27
commit
5e455ba0e9
2 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
const variants = ['warning'] as const;
|
||||
const variants = ['warning', 'error'] as const;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -3,6 +3,7 @@ import { defineThemes } from '../theme/theme.models';
|
|||
import { appThemes } from '../theme/themes';
|
||||
|
||||
import WarningIcon from '~icons/mdi/alert-circle-outline';
|
||||
import ErrorIcon from '~icons/mdi/close-circle-outline';
|
||||
|
||||
export const { useTheme } = defineThemes({
|
||||
dark: {
|
||||
|
@ -12,6 +13,12 @@ export const { useTheme } = defineThemes({
|
|||
textColor: appThemes.dark.warning.color,
|
||||
icon: WarningIcon,
|
||||
},
|
||||
error: {
|
||||
backgroundColor: appThemes.dark.error.colorFaded,
|
||||
borderColor: appThemes.dark.error.color,
|
||||
textColor: appThemes.dark.error.color,
|
||||
icon: ErrorIcon,
|
||||
},
|
||||
},
|
||||
light: {
|
||||
warning: {
|
||||
|
@ -20,5 +27,11 @@ export const { useTheme } = defineThemes({
|
|||
textColor: darken(appThemes.light.warning.color, 40),
|
||||
icon: WarningIcon,
|
||||
},
|
||||
error: {
|
||||
backgroundColor: appThemes.light.error.colorFaded,
|
||||
borderColor: appThemes.light.error.color,
|
||||
textColor: darken(appThemes.light.error.color, 40),
|
||||
icon: ErrorIcon,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue