diff --git a/package.json b/package.json index 5005022..d6cc6db 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "axp-ui", "descriiption": "My helper ui lib", - "version": "1.6.2", + "version": "1.6.3", "homepage": "https://antoxahub.ru/antoxa/axp-ui", "repository": { "type": "git", diff --git a/src/colors.ts b/src/colors.ts index 6cbdcfd..2741865 100644 --- a/src/colors.ts +++ b/src/colors.ts @@ -11,4 +11,4 @@ export enum ColorEnum { export type TColor = keyof typeof ColorEnum -export const colors = Object.keys(ColorEnum) +export const colors = Object.keys(ColorEnum) diff --git a/src/components/Form.vue b/src/components/Form.vue index dac1df4..7a19ce4 100644 --- a/src/components/Form.vue +++ b/src/components/Form.vue @@ -51,7 +51,7 @@ const title = computed(() => { const load = ref(false) watch(load, val => emit('update:load', val)) -const messages: Ref = ref(props.messages || []) +const messages = ref(props.messages || []) watch( () => props.messages, val => (messages.value = val || []) @@ -101,7 +101,7 @@ const submitHandler = async () => { // Etc. const getColorMessage = (item: TNotificationItem) => { - return colors.includes(item.code) ? item.code : 'error' + return colors.find(e => e === item.code) ?? 'error' } @@ -114,7 +114,7 @@ const getColorMessage = (item: TNotificationItem) => {
diff --git a/src/components/ToggleTheme.vue b/src/components/ToggleTheme.vue index dd11b72..dda415e 100644 --- a/src/components/ToggleTheme.vue +++ b/src/components/ToggleTheme.vue @@ -1,21 +1,29 @@ + + diff --git a/tailwind.config.ts b/tailwind.config.ts index 838f149..e2a469a 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -2,6 +2,7 @@ import type { Config } from 'tailwindcss' const config: Config = { content: ['./src/components/**/*.vue'], + darkMode: 'class', theme: { extend: { colors: {