diff --git a/frontend/src/components/QuestionInput/QuestionInput.module.css b/frontend/src/components/QuestionInput/QuestionInput.module.css index fa5542d541..17eac8ee1a 100644 --- a/frontend/src/components/QuestionInput/QuestionInput.module.css +++ b/frontend/src/components/QuestionInput/QuestionInput.module.css @@ -1,3 +1,9 @@ +/* CUSTOM CSS PROPERTIES */ +:root { + --base-ink: #1c1d1f; + --primary-lightest: #e8f5ff; +} + .questionInputContainer { height: fit-content; position: absolute; @@ -59,12 +65,6 @@ } } -.errorText { - top: -50px; - z-index: 1; - gap: 12px; -} - .textAreaOverrides { font-size: 16px !important; } @@ -74,6 +74,18 @@ align-items: center; } +/* alert styling */ + +.errorAlert { + top: -50px; + z-index: 1; + gap: 12px; +} + +.alertCloseButton { + color: var(--base-ink) !important; +} + /* file input styling */ .fileInputLabel { @@ -86,12 +98,15 @@ } .fileUploadPreviewsContainer { - background: pink; - width: 100%; - height: fit-content + height: fit-content; } .fileUploadPreview { - background: #E8F5FF; + height: 3rem; + border-radius: 0.25rem; + text-align: center; + justify-content:center; + display:inline-flex; + background: var(--primary-lightest) !important; text-overflow: ellipsis; } diff --git a/frontend/src/components/QuestionInput/QuestionInput.tsx b/frontend/src/components/QuestionInput/QuestionInput.tsx index a12e712e52..7f90b643b1 100644 --- a/frontend/src/components/QuestionInput/QuestionInput.tsx +++ b/frontend/src/components/QuestionInput/QuestionInput.tsx @@ -183,16 +183,27 @@ export const QuestionInput = ({ onSend, disabled, placeholder, clearOnSend, conv } } - const sendQuestionDisabled = disabled || !question.trim() + const formatFileName = (fileName: string) => { + if (fileName.length < 20) { + return fileName; + } + + return `${fileName.substring(0,9)}...${fileName.substring(fileName.length - 9)}` + } return (
{inputError && (
+ className={`usa-alert usa-alert--error usa-alert--slim line-height-sans-5 width-full padding-y-0 position-absolute display-flex flex-justify ${styles.errorAlert}`}>

{inputError}

+
)} -
+
{selectedFile && ( -
+
-

{selectedFile.name}

- @@ -239,7 +250,7 @@ export const QuestionInput = ({ onSend, disabled, placeholder, clearOnSend, conv />