From 67755ca80a2d4692d2cec3a55ce93bf8955cffad Mon Sep 17 00:00:00 2001
From: andrewwallacespeckle
<139135120+andrewwallacespeckle@users.noreply.github.com>
Date: Thu, 5 Sep 2024 09:45:19 +0100
Subject: [PATCH] fix(ui-components): Update switch to match new design system
(#2878)
* Update switch to match style
* Fix colour variable
* Update colour
---
.../page/settings/webhooks/Webhooks.vue | 2 --
packages/tailwind-theme/src/plugin.ts | 2 ++
packages/tailwind-theme/src/preset.ts | 1 +
.../src/components/form/Switch.vue | 34 ++++---------------
4 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/packages/frontend-2/components/project/page/settings/webhooks/Webhooks.vue b/packages/frontend-2/components/project/page/settings/webhooks/Webhooks.vue
index b6a34aca8..2bab47fb1 100644
--- a/packages/frontend-2/components/project/page/settings/webhooks/Webhooks.vue
+++ b/packages/frontend-2/components/project/page/settings/webhooks/Webhooks.vue
@@ -49,10 +49,8 @@
onEnabledChange(item, newValue)"
/>
diff --git a/packages/tailwind-theme/src/plugin.ts b/packages/tailwind-theme/src/plugin.ts
index 8e9d80679..5fd4b26f2 100644
--- a/packages/tailwind-theme/src/plugin.ts
+++ b/packages/tailwind-theme/src/plugin.ts
@@ -22,6 +22,7 @@ export const lightThemeVariables = {
'--foreground-3': '#7C7C7D',
/* foreground color when put on top of a primary colored background */
'--foreground-on-primary': '#fff',
+ '--foreground-disabled': '#1A1A1A50',
/* primary color */
'--primary': '#136CFF',
@@ -83,6 +84,7 @@ export const darkThemeVariables = {
'--foreground-2': '#B0B1B5',
'--foreground-3': '#7E7F82',
'--foreground-on-primary': '#FFFFFF',
+ '--foreground-disabled': '#FFFFFF50',
/* primary color */
'--primary': '#136CFF',
diff --git a/packages/tailwind-theme/src/preset.ts b/packages/tailwind-theme/src/preset.ts
index c05ce3756..e9f0ce9d2 100644
--- a/packages/tailwind-theme/src/preset.ts
+++ b/packages/tailwind-theme/src/preset.ts
@@ -42,6 +42,7 @@ const config: Config = {
foreground: {
DEFAULT: 'var(--foreground)',
2: 'var(--foreground-2)',
+ 3: 'var(--foreground-3)',
disabled: 'var(--foreground-disabled)',
'on-primary': 'var(--foreground-on-primary)',
primary: 'var(--foreground-primary)'
diff --git a/packages/ui-components/src/components/form/Switch.vue b/packages/ui-components/src/components/form/Switch.vue
index c3db12c1f..c75e67196 100644
--- a/packages/ui-components/src/components/form/Switch.vue
+++ b/packages/ui-components/src/components/form/Switch.vue
@@ -7,18 +7,6 @@
:name="name"
:disabled="disabled"
>
-
-
-
-