From 1825989663d4e5cb2aa2fbd4d5c40080cd6c0937 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 11 Dec 2024 15:27:29 +0530 Subject: [PATCH] feat: add colors to text chip --- .../components-next/message/chips/File.vue | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/javascript/dashboard/components-next/message/chips/File.vue b/app/javascript/dashboard/components-next/message/chips/File.vue index 99fcaa300..55b4a2b3a 100644 --- a/app/javascript/dashboard/components-next/message/chips/File.vue +++ b/app/javascript/dashboard/components-next/message/chips/File.vue @@ -26,6 +26,29 @@ const fileName = computed(() => { const fileType = computed(() => { return fileName.value.split('.').pop(); }); + +const textColorClass = computed(() => { + const colorMap = { + '7z': 'dark:text-[#EDEEF0] text-[#2F265F]', + csv: 'text-amber-12', + doc: 'dark:text-[#D6E1FF] text-[#1F2D5C]', // indigo-12 + docx: 'dark:text-[#D6E1FF] text-[#1F2D5C]', // indigo-12 + json: 'text-n-slate-12', + odt: 'dark:text-[#D6E1FF] text-[#1F2D5C]', // indigo-12 + pdf: 'text-n-ruby-12', + ppt: 'dark:text-[#FFE0C2] text-[#582D1D]', + pptx: 'dark:text-[#FFE0C2] text-[#582D1D]', + rar: 'dark:text-[#EDEEF0] text-[#2F265F]', + rtf: 'dark:text-[#D6E1FF] text-[#1F2D5C]', // indigo-12 + tar: 'dark:text-[#EDEEF0] text-[#2F265F]', + txt: 'text-n-slate-12', + xls: 'text-n-teal-12', + xlsx: 'text-n-teal-12', + zip: 'dark:text-[#EDEEF0] text-[#2F265F]', + }; + + return colorMap[fileType.value] || 'text-n-slate-12'; +});