From 57b32ca9b66648d74b33d94f7f449ac7db380467 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 4 Jun 2024 14:06:14 +0200 Subject: [PATCH] playground(alert): improve actions color --- playground/pages/alert.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/playground/pages/alert.vue b/playground/pages/alert.vue index b9e7216b..7214b9c5 100644 --- a/playground/pages/alert.vue +++ b/playground/pages/alert.vue @@ -3,8 +3,9 @@ import theme from '#build/ui/alert' const variants = Object.keys(theme.variants.variant) -const actions = [{ +const actions = (variant?: string) => [{ label: 'Action', + color: (variant === 'solid' ? 'black' as const : 'primary' as const), click() { console.log('Action clicked') } @@ -14,7 +15,7 @@ const data = { title: 'Heads up!', description: 'You can add components to your app using the cli.', icon: 'i-heroicons-command-line', - actions, + actions: actions(), close: true } @@ -30,6 +31,13 @@ const data = { - +