From e4552b45397f4c00a37a599a378508201b782e45 Mon Sep 17 00:00:00 2001 From: Driss Chelouati Date: Fri, 8 Dec 2023 09:40:13 +0100 Subject: [PATCH] feat(Mark): config redesign and implementation --- src/plugins/components/mark/index.ts | 6 ++++-- src/plugins/components/mark/mark.config.ts | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/plugins/components/mark/index.ts b/src/plugins/components/mark/index.ts index 1d6a3b8..ed96365 100644 --- a/src/plugins/components/mark/index.ts +++ b/src/plugins/components/mark/index.ts @@ -16,8 +16,10 @@ export default plugin.withOptions( addComponents({ [`.${prefix}mark`]: { - [`@apply bg-${config.bg} dark:bg-${config.bgDark}`]: {}, - [`@apply text-${config.text} dark:text-${config.textDark}`]: {}, + [`@apply bg-${config.background.light} dark:bg-${config.background.dark}`]: + {}, + [`@apply text-${config.color.light} dark:text-${config.color.dark}`]: + {}, }, }) } diff --git a/src/plugins/components/mark/mark.config.ts b/src/plugins/components/mark/mark.config.ts index dc28e8f..6380d1f 100644 --- a/src/plugins/components/mark/mark.config.ts +++ b/src/plugins/components/mark/mark.config.ts @@ -1,10 +1,14 @@ export const key = 'mark' as const export const defaultConfig = { - bg: 'primary-100', - bgDark: 'primary-800', - text: 'primary-800', - textDark: 'primary-200', + background: { + light: 'primary-100', + dark: 'primary-800', + }, + color: { + light: 'primary-800', + dark: 'primary-200', + }, } export type MarkConfig = typeof defaultConfig