Remove hard-coded colors and unnecessary dark classes (#636)

Change hard coded colors to langflow constants colors
This commit is contained in:
Lucas Oliveira 2023-07-25 10:09:12 -03:00 • committed by GitHub
commit 45673dcda8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View file

@ -38,9 +38,10 @@
--info-background: #f0f4fd; --info-background: #f0f4fd;
--info-foreground: #141653; --info-foreground: #141653;
--high-indigo: #4338ca; --high-indigo: #4338ca;
--medium-indigo: #6366f1; --medium-indigo: #6366f1;
--low-indigo: #e0e7ff;
--chat-bot-icon: #afe6ef; --chat-bot-icon: #afe6ef;
--chat-user-icon: #aface9; --chat-user-icon: #aface9;
@ -52,6 +53,7 @@
--chat-trigger-disabled: #b4c3da; --chat-trigger-disabled: #b4c3da;
--status-red: #ef4444; --status-red: #ef4444;
--status-yellow: #eab308; --status-yellow: #eab308;
--chat-send: #059669;
--status-green: #4ade80; --status-green: #4ade80;
--status-blue:#2563eb; --status-blue:#2563eb;
--connection: #555; --connection: #555;
@ -104,6 +106,7 @@
--high-indigo: #4338ca; --high-indigo: #4338ca;
--medium-indigo: #6366f1; --medium-indigo: #6366f1;
--low-indigo: #e0e7ff;
/* Colors that are shared in dark and light mode */ /* Colors that are shared in dark and light mode */
--blur-shared: #151923d2; --blur-shared: #151923d2;
@ -112,6 +115,7 @@
--chat-trigger-disabled: #2d3b54; --chat-trigger-disabled: #2d3b54;
--status-red: #ef4444; --status-red: #ef4444;
--status-yellow: #eab308; --status-yellow: #eab308;
--chat-send: #059669;
--status-green: #4ade80; --status-green: #4ade80;
--status-blue: #2563eb; --status-blue: #2563eb;
--connection: #555; --connection: #555;

View file

@ -68,10 +68,10 @@ export default function ChatInput({
className={classNames( className={classNames(
"form-modal-send-button", "form-modal-send-button",
noInput noInput
? "bg-indigo-600 text-background" ? "bg-high-indigo text-background"
: chatValue === "" : chatValue === ""
? "text-primary" ? "text-primary"
: "bg-emerald-600 text-background" : "bg-chat-send text-background"
)} )}
disabled={lockChat} disabled={lockChat}
onClick={() => sendMessage()} onClick={() => sendMessage()}

View file

@ -395,7 +395,7 @@ export default function FormModal({
<span className="pr-2">Chat</span> <span className="pr-2">Chat</span>
<IconComponent <IconComponent
name="prompts" name="prompts"
className="h-6 w-6 pl-1 text-gray-800 dark:text-white" className="h-6 w-6 pl-1 text-foreground"
aria-hidden="true" aria-hidden="true"
/> />
</DialogTitle> </DialogTitle>

View file

@ -29,6 +29,8 @@ module.exports = {
}, },
extend: { extend: {
colors: { colors: {
"low-indigo": "var(--low-indigo)",
"chat-send": "var(--chat-send)",
connection: "var(--connection)", connection: "var(--connection)",
"almost-dark-gray": "var(--almost-dark-gray)", "almost-dark-gray": "var(--almost-dark-gray)",
"almost-light-blue": "var(--almost-light-blue)", "almost-light-blue": "var(--almost-light-blue)",