From abdd26f662e5b3cfacd01ce584f686bc8c815330 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Thu, 3 Feb 2022 16:25:21 +0530
Subject: [PATCH] fix(ui): center toasts - wider toasts - narrower sidebar
---
src/App.vue | 3 ---
src/colors.js | 7 ++++++-
src/components/Badge.vue | 4 ++--
src/components/Toast.vue | 17 ++++++++++-------
src/pages/Desk.vue | 18 ++++++++++++++----
5 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index fb085147..6e40f1ab 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -18,9 +18,6 @@
@setup-complete="setupComplete"
@setup-canceled="setupCanceled"
/>
-
diff --git a/src/colors.js b/src/colors.js
index c0ffeb53..6b374deb 100644
--- a/src/colors.js
+++ b/src/colors.js
@@ -27,11 +27,16 @@ const getValidColor = (color) => {
export function getBgColorClass(color) {
return `bg-${getValidColor(color)}-100`;
}
+
+export function getColorClass(color, type, value = 300) {
+ return `${type}-${getValidColor(color)}-${value}`;
+}
+
export function getTextColorClass(color) {
return `text-${getValidColor(color)}-600`;
}
-export function getColorClass(color) {
+export function getBgTextColorClass(color) {
const bg = getBgColorClass(color);
const text = getTextColorClass(color);
return [bg, text].join(' ');
diff --git a/src/components/Badge.vue b/src/components/Badge.vue
index 5ecd3d5e..cda009bb 100644
--- a/src/components/Badge.vue
+++ b/src/components/Badge.vue
@@ -5,7 +5,7 @@