From 89c5343c813835140b7e504c2386bf2a9588fb5f Mon Sep 17 00:00:00 2001 From: Tanner Ricks <182143365+tanner-ricks@users.noreply.github.com> Date: Tue, 4 Feb 2025 09:43:49 -0600 Subject: [PATCH] [Styling] Use CFPB Colors in Tailwind Theme (#1112) Find hardcoded colors and replace them to use tailwind theme colors ## Changes - Updated locations of hardcoded colors to take advantage of tailwind styles instead ## How to test this PR #### Setup for verification - Perform any console commands below from within the `sbl-frontend` directory 1. Run `checkout main && git pull` 2. Restart the stack 3. Run `yarn run test:e2e:snapshot-update` 4. Once finished `ctrl-c` 5. Run `git add --all` 6. Run `git stash` 7. Run `git checkout 1094-tailwind-theme && git pull` 8. Run `git stash pop` 9. Restart the stack #### Verify the changes 1. Run `yarn run test:e2e:snapshot` 2. In the playwright testing window that appears, run all tests 3. Verify that there are no relevant snapshot related failures 4. Click through the site and verify that things look as they should --- index.html | 1 - src/components/Button.tsx | 5 ++--- src/components/FieldGroup.tsx | 2 +- src/components/FieldGroupDivider.tsx | 2 +- src/components/InlineStatus.tsx | 2 +- src/components/Loading.tsx | 2 +- src/index.css | 12 ++++++++---- src/pages/AuthenticatedLanding/Landing.less | 3 ++- src/pages/AuthenticatedLanding/index.tsx | 1 - src/pages/Error/Error500.tsx | 1 - src/pages/Error/NotFound404.tsx | 1 - src/pages/Filing/FilingApp/FileSubmission.tsx | 4 ++-- src/pages/Filing/FilingHome.less | 3 ++- src/pages/Filing/FilingHome.tsx | 1 - tailwind.config.js | 7 ++++++- vite.config.ts | 1 - 16 files changed, 26 insertions(+), 22 deletions(-) diff --git a/index.html b/index.html index 36d81536b..a1041f164 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,6 @@ name="description" content="Use the CFPB Small Business Lending Data Filing Platform to upload your lending data, review validation results, and submit your filing." /> - {children} diff --git a/src/components/FieldGroupDivider.tsx b/src/components/FieldGroupDivider.tsx index b6fc61b78..27d2a68b8 100644 --- a/src/components/FieldGroupDivider.tsx +++ b/src/components/FieldGroupDivider.tsx @@ -1,5 +1,5 @@ export default function FieldGroupDivider(): JSX.Element { return ( -
+ ); } diff --git a/src/components/InlineStatus.tsx b/src/components/InlineStatus.tsx index 6a8f5790b..e103f0da0 100644 --- a/src/components/InlineStatus.tsx +++ b/src/components/InlineStatus.tsx @@ -60,7 +60,7 @@ function InlineStatus({ const getStatusClassName = (): string => { const { value } = classNamePriorityPipe.find(option => option.condition) ?? {}; - return value ?? 'text-[#0072CE]'; + return value ?? 'text-pacific'; }; const getMessage = (): JSX.Element | null => { diff --git a/src/components/Loading.tsx b/src/components/Loading.tsx index 6eb2083cf..131b932aa 100644 --- a/src/components/Loading.tsx +++ b/src/components/Loading.tsx @@ -16,7 +16,7 @@ export function LoadingContent({ message = 'Loading', }: LoadingType): ReactElement { return ( -