From 74ff3d5028f7cb7ab0243a40e4a81509c0f7bc38 Mon Sep 17 00:00:00 2001 From: Jeroen Branje Date: Wed, 21 Feb 2024 14:51:24 +0100 Subject: [PATCH] feat(design-system): Change brand colors Signed-off-by: Jeroen Branje --- .../src/components/Atoms/Button/Button.tsx | 4 ++-- .../src/components/Atoms/Button/Button.ui.test.tsx | 2 +- .../components/Atoms/Form/Checkbox/Checkbox.tsx | 2 +- .../components/Atoms/Form/Checkbox/Checkboxes.tsx | 2 +- .../src/components/Atoms/Grid/Grid.stories.tsx | 14 +++++++------- .../Atoms/LoadingIndicator/LoadingIndicator.tsx | 2 +- .../LoadingIndicator/LoadingIndicator.ui.test.tsx | 2 +- .../src/components/Atoms/Pill/Pill.tsx | 2 +- .../MemberProfileCard/MemberProfileCard.tsx | 2 +- apps/design-system/src/types/index.ts | 2 +- apps/design-system/tailwind.config.js | 8 +++++--- .../modules/HeroHeader/HeroHeader.tsx | 4 ++-- .../modules/Navigation/Navigation.tsx | 2 +- .../modules/Profile/Profile.tsx | 2 +- apps/envited.ascs.digital/tailwind.config.js | 8 +++++--- 15 files changed, 31 insertions(+), 27 deletions(-) diff --git a/apps/design-system/src/components/Atoms/Button/Button.tsx b/apps/design-system/src/components/Atoms/Button/Button.tsx index caae1649..8b88304b 100644 --- a/apps/design-system/src/components/Atoms/Button/Button.tsx +++ b/apps/design-system/src/components/Atoms/Button/Button.tsx @@ -26,8 +26,8 @@ const Button: FC = ({ }) => { const styleClassMap = { [ButtonType.primary]: { - [ButtonStyle.solid]: 'bg-orange hover:bg-orange-700 text-white', - [ButtonStyle.ghost]: 'text-orange hover:text-white border-orange hover:bg-orange border-solid border-2', + [ButtonStyle.solid]: 'bg-blue-900 hover:bg-blue-800 text-white', + [ButtonStyle.ghost]: 'text-blue hover:text-white border-blue hover:bg-blue border-solid border-2', }, [ButtonType.secondary]: { [ButtonStyle.solid]: 'bg-gray-300 hover:bg-gray-400 text-gray-700 hover:text-gray-50', diff --git a/apps/design-system/src/components/Atoms/Button/Button.ui.test.tsx b/apps/design-system/src/components/Atoms/Button/Button.ui.test.tsx index 3aa01f67..b3385e5c 100644 --- a/apps/design-system/src/components/Atoms/Button/Button.ui.test.tsx +++ b/apps/design-system/src/components/Atoms/Button/Button.ui.test.tsx @@ -15,7 +15,7 @@ describe('components/Button', () => { // then ... should render with expected properties expect(element).toBeInTheDocument() - expect(element).toHaveClass('bg-orange') + expect(element).toHaveClass('bg-blue') await userEvent.click(element) expect(onClickStub).toHaveBeenCalledWith() }) diff --git a/apps/design-system/src/components/Atoms/Form/Checkbox/Checkbox.tsx b/apps/design-system/src/components/Atoms/Form/Checkbox/Checkbox.tsx index dc75361a..010c8cc2 100644 --- a/apps/design-system/src/components/Atoms/Form/Checkbox/Checkbox.tsx +++ b/apps/design-system/src/components/Atoms/Form/Checkbox/Checkbox.tsx @@ -33,7 +33,7 @@ export const Checkbox: FC = ({ ref={inputRef} checked={checked} type="checkbox" - className="h-4 w-4 rounded border-gray-300 text-orange-600 focus:ring-orange-600" + className="h-4 w-4 rounded border-gray-300 text-blue-900 focus:ring-blue-900" />
diff --git a/apps/design-system/src/components/Atoms/Form/Checkbox/Checkboxes.tsx b/apps/design-system/src/components/Atoms/Form/Checkbox/Checkboxes.tsx index 552bb274..6d7ae0a0 100644 --- a/apps/design-system/src/components/Atoms/Form/Checkbox/Checkboxes.tsx +++ b/apps/design-system/src/components/Atoms/Form/Checkbox/Checkboxes.tsx @@ -49,7 +49,7 @@ export const Checkboxes: FC = ({ ref={inputRef} checked={includes(id)(values)} type="checkbox" - className="h-4 w-4 rounded border-gray-300 text-orange-600 focus:ring-orange-600" + className="h-4 w-4 rounded border-gray-300 text-blue-800 focus:ring-blue-800" />
diff --git a/apps/design-system/src/components/Atoms/Grid/Grid.stories.tsx b/apps/design-system/src/components/Atoms/Grid/Grid.stories.tsx index 6c4a64ca..184c8157 100644 --- a/apps/design-system/src/components/Atoms/Grid/Grid.stories.tsx +++ b/apps/design-system/src/components/Atoms/Grid/Grid.stories.tsx @@ -14,13 +14,13 @@ export default { const GridTemplate: Story = ({ columns }) => ( -
-
-
-
-
-
-
+
+
+
+
+
+
+
) diff --git a/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.tsx b/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.tsx index f08c6462..7308b2c6 100644 --- a/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.tsx +++ b/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.tsx @@ -7,7 +7,7 @@ interface Props { colour?: Colour } -const LoadingIndicator: FC = ({ size = Size.medium, colour = Colour.orange }) => { +const LoadingIndicator: FC = ({ size = Size.medium, colour = Colour.blue }) => { const sizeClassMap = { [Size.small]: 'h-3.5 w-3.5', [Size.medium]: 'h-4 w-4', diff --git a/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.ui.test.tsx b/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.ui.test.tsx index 511a8daa..02c9cf86 100644 --- a/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.ui.test.tsx +++ b/apps/design-system/src/components/Atoms/LoadingIndicator/LoadingIndicator.ui.test.tsx @@ -12,7 +12,7 @@ describe('components/LoadingIndicator', () => { // then ... should render with expected properties expect(element).toBeInTheDocument() - expect(element.closest('svg')).toHaveClass('text-orange') + expect(element.closest('svg')).toHaveClass('text-blue') }) it('should render LoadingIndicator with specific properties', () => { diff --git a/apps/design-system/src/components/Atoms/Pill/Pill.tsx b/apps/design-system/src/components/Atoms/Pill/Pill.tsx index da8fc58f..10f42c45 100644 --- a/apps/design-system/src/components/Atoms/Pill/Pill.tsx +++ b/apps/design-system/src/components/Atoms/Pill/Pill.tsx @@ -16,7 +16,7 @@ const Pill: FC = ({ size = Size.small, children }) => { return (
{children}
diff --git a/apps/design-system/src/components/Molecules/MemberProfileCard/MemberProfileCard.tsx b/apps/design-system/src/components/Molecules/MemberProfileCard/MemberProfileCard.tsx index 24ff2001..e0bcf972 100644 --- a/apps/design-system/src/components/Molecules/MemberProfileCard/MemberProfileCard.tsx +++ b/apps/design-system/src/components/Molecules/MemberProfileCard/MemberProfileCard.tsx @@ -22,7 +22,7 @@ const MemberProfileCard: FC = ({ businessCategories, }) => { return ( -
+
{title}
diff --git a/apps/design-system/src/types/index.ts b/apps/design-system/src/types/index.ts index 6d1c6d19..f031d234 100644 --- a/apps/design-system/src/types/index.ts +++ b/apps/design-system/src/types/index.ts @@ -18,7 +18,7 @@ export enum Colour { main = 'main', white = 'white', black = 'black', - orange = 'orange', + blue = 'blue', } export enum ButtonType { diff --git a/apps/design-system/tailwind.config.js b/apps/design-system/tailwind.config.js index eb862864..69eb1657 100644 --- a/apps/design-system/tailwind.config.js +++ b/apps/design-system/tailwind.config.js @@ -20,9 +20,11 @@ module.exports = { red: colors.red, green: colors.green, indigo: colors.indigo, - orange: { - ...colors.orange, - DEFAULT: '#ff584d', + blue: { + ...colors.blue, + 800: '#798bb3', + 900: '#5a6f9f', + DEFAULT: '#848ab7', }, }, extend: {}, diff --git a/apps/envited.ascs.digital/modules/HeroHeader/HeroHeader.tsx b/apps/envited.ascs.digital/modules/HeroHeader/HeroHeader.tsx index 11668d05..d10c973f 100644 --- a/apps/envited.ascs.digital/modules/HeroHeader/HeroHeader.tsx +++ b/apps/envited.ascs.digital/modules/HeroHeader/HeroHeader.tsx @@ -67,7 +67,7 @@ export const HeroHeader: FC = () => { return (
{searchParams.has('error') ? ( -
Could not sign you in
+
Could not sign you in
) : null} @@ -96,7 +96,7 @@ export const HeroHeader: FC = () => {
- + See list of registered members
diff --git a/apps/envited.ascs.digital/modules/Navigation/Navigation.tsx b/apps/envited.ascs.digital/modules/Navigation/Navigation.tsx index 88992f10..ed3c22a4 100644 --- a/apps/envited.ascs.digital/modules/Navigation/Navigation.tsx +++ b/apps/envited.ascs.digital/modules/Navigation/Navigation.tsx @@ -17,7 +17,7 @@ const NavLink: FC = ({ href, name, icon = <> }) => { const isActive = equals(pathname)(href) const iconElement = !isEmpty(icon) ? ( -
{icon}
+
{icon}
) : null return ( diff --git a/apps/envited.ascs.digital/modules/Profile/Profile.tsx b/apps/envited.ascs.digital/modules/Profile/Profile.tsx index c48fd95a..b63741da 100644 --- a/apps/envited.ascs.digital/modules/Profile/Profile.tsx +++ b/apps/envited.ascs.digital/modules/Profile/Profile.tsx @@ -335,7 +335,7 @@ export const Profile: FC = ({ profile, memberCategories }) => {
diff --git a/apps/envited.ascs.digital/tailwind.config.js b/apps/envited.ascs.digital/tailwind.config.js index 65be5cdf..f8c5859c 100644 --- a/apps/envited.ascs.digital/tailwind.config.js +++ b/apps/envited.ascs.digital/tailwind.config.js @@ -21,9 +21,11 @@ module.exports = { red: colors.red, green: colors.green, indigo: colors.indigo, - orange: { - ...colors.orange, - DEFAULT: '#ff584d', + blue: { + ...colors.blue, + 800: '#798bb3', + 900: '#5a6f9f', + DEFAULT: '#848ab7', }, }, extend: {},