From 2af694ceb92882c7534cefd87229a0f24e22c0e3 Mon Sep 17 00:00:00 2001 From: Wiktoria Salamon Date: Tue, 2 Jul 2024 16:33:10 +0200 Subject: [PATCH 1/7] feat: add Typography component --- .../common/Typography/Typography.interface.ts | 42 +++++++++++++ .../common/Typography/Typography.tsx | 63 +++++++++++++++++++ .../src/components/common/Typography/index.ts | 1 + 3 files changed, 106 insertions(+) create mode 100644 frontend/src/components/common/Typography/Typography.interface.ts create mode 100644 frontend/src/components/common/Typography/Typography.tsx create mode 100644 frontend/src/components/common/Typography/index.ts diff --git a/frontend/src/components/common/Typography/Typography.interface.ts b/frontend/src/components/common/Typography/Typography.interface.ts new file mode 100644 index 00000000..87ec42a9 --- /dev/null +++ b/frontend/src/components/common/Typography/Typography.interface.ts @@ -0,0 +1,42 @@ +export interface TypographyProps { + variant?: TypographyVariants; +} + +export type TypographyVariants = + 'hint/caps-medium' + | 'hint/regular' + | 'hint/medium' + | 'hint/semibold' + | 'hint/bold' + | 'body-s/regular' + | 'body-s/medium' + | 'body-s/semibold' + | 'body-s/bold' + | 'body-m/regular' + | 'body-m/medium' + | 'body-m/semibold' + | 'body-m/bold' + | 'body-l/regular' + | 'body-l/medium' + | 'body-l/semibold' + | 'body-l/bold' + | 'head-s/regular' + | 'head-s/medium' + | 'head-s/semibold' + | 'head-s/bold' + | 'head-m/regular' + | 'head-m/medium' + | 'head-m/semibold' + | 'head-m/bold' + | 'head-l/regular' + | 'head-l/medium' + | 'head-l/semibold' + | 'head-l/bold' + | 'head-xl/regular' + | 'head-xl/medium' + | 'head-xl/semibold' + | 'head-xl/bold' + | 'head-2xl/regular' + | 'head-2xl/medium' + | 'head-2xl/semibold' + | 'head-2xl/bold'; diff --git a/frontend/src/components/common/Typography/Typography.tsx b/frontend/src/components/common/Typography/Typography.tsx new file mode 100644 index 00000000..51945861 --- /dev/null +++ b/frontend/src/components/common/Typography/Typography.tsx @@ -0,0 +1,63 @@ +import { generateClassNames } from '@app/utils'; +import React, {PropsWithChildren} from 'react'; +import {TypographyProps, TypographyVariants} from "@app/components/common/Typography/Typography.interface"; + +const variantsStyles: { + [key in TypographyVariants]: string; +} = { + 'hint/caps-medium': 'text-xs tracking-[.6em] uppercase font-medium', + 'hint/regular': 'text-xs tracking-[.2em] font-normal', + 'hint/medium': 'text-xs font-medium', + 'hint/semibold': 'text-xs font-semibold', + 'hint/bold': 'text-xs font-bold', + 'body-s/regular': 'text-sm tracking-[.1em] font-normal', + 'body-s/medium': 'text-sm tracking-[.2em] font-medium', + 'body-s/semibold': 'text-sm tracking-[.2em] font-semibold', + 'body-s/bold': 'text-sm tracking-[.1em] font-bold', + 'body-m/regular': 'text-base tracking-[.2em] font-normal', + 'body-m/medium': 'text-base font-medium', + 'body-m/semibold': 'text-base font-semibold', + 'body-m/bold': 'text-base font-bold', + 'body-l/regular': 'text-lg font-normal', + 'body-l/medium': 'text-lg font-medium', + 'body-l/semibold': 'text-lg font-semibold', + 'body-l/bold': 'text-xl font-bold', + 'head-s/regular': 'text-xl font-normal', + 'head-s/medium': 'text-xl font-medium', + 'head-s/semibold': 'text-xl font-semibold', + 'head-s/bold': 'text-xl font-bold', + 'head-m/regular': 'text-2xl font-normal', + 'head-m/medium': 'text-2xl font-medium', + 'head-m/semibold': 'text-2xl font-semibold', + 'head-m/bold': 'text-2xl font-bold', + 'head-l/regular': 'text-3xl font-normal', + 'head-l/medium': 'text-3xl font-medium', + 'head-l/semibold': 'text-3xl font-semibold', + 'head-l/bold': 'text-3xl font-bold', + 'head-xl/regular': 'text-4xl font-normal', + 'head-xl/medium': 'text-4xl font-medium', + 'head-xl/semibold': 'text-4xl font-semibold', + 'head-xl/bold': 'text-4xl font-bold', + 'head-2xl/regular': 'text-5xl font-normal', + 'head-2xl/medium': 'text-5xl font-medium', + 'head-2xl/semibold': 'text-5xl font-semibold', + 'head-2xl/bold': 'text-5xl font-bold', +}; + +export const Typography = ({ + variant = 'body-m/regular', + className, + children, + }: PropsWithChildren) => { + const classnames = generateClassNames( + 'navy-900', + variantsStyles[variant], + className, + ); + + return ( + + {children} + + ); +}; diff --git a/frontend/src/components/common/Typography/index.ts b/frontend/src/components/common/Typography/index.ts new file mode 100644 index 00000000..6f8ebcfb --- /dev/null +++ b/frontend/src/components/common/Typography/index.ts @@ -0,0 +1 @@ +export {Typography} from './Typography'; From b3486b75b009ec051d1f53092fbf5314fec43c88 Mon Sep 17 00:00:00 2001 From: Wiktoria Salamon Date: Tue, 2 Jul 2024 18:52:43 +0200 Subject: [PATCH 2/7] feat: add element type to Typography props --- .../common/Typography/Typography.interface.ts | 78 ++++++++++--------- .../common/Typography/Typography.tsx | 41 +++++----- 2 files changed, 63 insertions(+), 56 deletions(-) diff --git a/frontend/src/components/common/Typography/Typography.interface.ts b/frontend/src/components/common/Typography/Typography.interface.ts index 87ec42a9..c2bcc3dc 100644 --- a/frontend/src/components/common/Typography/Typography.interface.ts +++ b/frontend/src/components/common/Typography/Typography.interface.ts @@ -1,42 +1,46 @@ export interface TypographyProps { variant?: TypographyVariants; + as?: TextElement; + className?: string; } export type TypographyVariants = - 'hint/caps-medium' - | 'hint/regular' - | 'hint/medium' - | 'hint/semibold' - | 'hint/bold' - | 'body-s/regular' - | 'body-s/medium' - | 'body-s/semibold' - | 'body-s/bold' - | 'body-m/regular' - | 'body-m/medium' - | 'body-m/semibold' - | 'body-m/bold' - | 'body-l/regular' - | 'body-l/medium' - | 'body-l/semibold' - | 'body-l/bold' - | 'head-s/regular' - | 'head-s/medium' - | 'head-s/semibold' - | 'head-s/bold' - | 'head-m/regular' - | 'head-m/medium' - | 'head-m/semibold' - | 'head-m/bold' - | 'head-l/regular' - | 'head-l/medium' - | 'head-l/semibold' - | 'head-l/bold' - | 'head-xl/regular' - | 'head-xl/medium' - | 'head-xl/semibold' - | 'head-xl/bold' - | 'head-2xl/regular' - | 'head-2xl/medium' - | 'head-2xl/semibold' - | 'head-2xl/bold'; + | 'hint/caps-medium' + | 'hint/regular' + | 'hint/medium' + | 'hint/semibold' + | 'hint/bold' + | 'body-s/regular' + | 'body-s/medium' + | 'body-s/semibold' + | 'body-s/bold' + | 'body-m/regular' + | 'body-m/medium' + | 'body-m/semibold' + | 'body-m/bold' + | 'body-l/regular' + | 'body-l/medium' + | 'body-l/semibold' + | 'body-l/bold' + | 'head-s/regular' + | 'head-s/medium' + | 'head-s/semibold' + | 'head-s/bold' + | 'head-m/regular' + | 'head-m/medium' + | 'head-m/semibold' + | 'head-m/bold' + | 'head-l/regular' + | 'head-l/medium' + | 'head-l/semibold' + | 'head-l/bold' + | 'head-xl/regular' + | 'head-xl/medium' + | 'head-xl/semibold' + | 'head-xl/bold' + | 'head-2xl/regular' + | 'head-2xl/medium' + | 'head-2xl/semibold' + | 'head-2xl/bold'; + +export type TextElement = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; \ No newline at end of file diff --git a/frontend/src/components/common/Typography/Typography.tsx b/frontend/src/components/common/Typography/Typography.tsx index 51945861..4fada642 100644 --- a/frontend/src/components/common/Typography/Typography.tsx +++ b/frontend/src/components/common/Typography/Typography.tsx @@ -1,9 +1,8 @@ -import { generateClassNames } from '@app/utils'; -import React, {PropsWithChildren} from 'react'; -import {TypographyProps, TypographyVariants} from "@app/components/common/Typography/Typography.interface"; +import React, { PropsWithChildren } from 'react'; +import { TypographyProps, TypographyVariants } from '@app/components/common/Typography/Typography.interface'; const variantsStyles: { - [key in TypographyVariants]: string; + [key in TypographyVariants]: string; } = { 'hint/caps-medium': 'text-xs tracking-[.6em] uppercase font-medium', 'hint/regular': 'text-xs tracking-[.2em] font-normal', @@ -44,20 +43,24 @@ const variantsStyles: { 'head-2xl/bold': 'text-5xl font-bold', }; -export const Typography = ({ - variant = 'body-m/regular', - className, - children, - }: PropsWithChildren) => { - const classnames = generateClassNames( - 'navy-900', - variantsStyles[variant], - className, - ); +export const Typography = ({ variant = 'body-m/regular', as, className, children }: PropsWithChildren) => { + const classnames = `navy-900 ${variantsStyles[variant]} ${className}`; - return ( - - {children} - - ); + switch (as) { + case 'h1': + return

{children}

; + case 'h2': + return

{children}

; + case 'h3': + return

{children}

; + case 'h4': + return

{children}

; + case 'h5': + return
{children}
; + case 'h6': + return

{children}

; + case 'p': + default: + return

{children}

; + } }; From 1a79fdc4b88d9e9deaee9f0845aaef701d259a75 Mon Sep 17 00:00:00 2001 From: Wiktoria Salamon Date: Tue, 2 Jul 2024 19:09:29 +0200 Subject: [PATCH 3/7] linter --- .../components/common/Typography/Typography.interface.ts | 2 +- frontend/src/components/common/Typography/Typography.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/common/Typography/Typography.interface.ts b/frontend/src/components/common/Typography/Typography.interface.ts index c2bcc3dc..8873a884 100644 --- a/frontend/src/components/common/Typography/Typography.interface.ts +++ b/frontend/src/components/common/Typography/Typography.interface.ts @@ -43,4 +43,4 @@ export type TypographyVariants = | 'head-2xl/semibold' | 'head-2xl/bold'; -export type TextElement = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; \ No newline at end of file +export type TextElement = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; diff --git a/frontend/src/components/common/Typography/Typography.tsx b/frontend/src/components/common/Typography/Typography.tsx index 4fada642..4e08e1b1 100644 --- a/frontend/src/components/common/Typography/Typography.tsx +++ b/frontend/src/components/common/Typography/Typography.tsx @@ -43,7 +43,12 @@ const variantsStyles: { 'head-2xl/bold': 'text-5xl font-bold', }; -export const Typography = ({ variant = 'body-m/regular', as, className, children }: PropsWithChildren) => { +export const Typography = ({ + variant = 'body-m/regular', + as, + className, + children, +}: PropsWithChildren) => { const classnames = `navy-900 ${variantsStyles[variant]} ${className}`; switch (as) { From b6370ff4dce5bed8dbaa8c0839c447c0e94c233a Mon Sep 17 00:00:00 2001 From: Wiktoria Salamon Date: Wed, 3 Jul 2024 11:15:41 +0200 Subject: [PATCH 4/7] refactor: use typography for all copies in the app --- frontend/src/app/(app)/documentation/page.tsx | 4 +- frontend/src/app/(app)/library/page.tsx | 5 +- frontend/src/app/(app)/my-space/page.tsx | 4 +- frontend/src/app/(app)/page.tsx | 7 ++- frontend/src/app/(app)/people/page.tsx | 4 +- .../common/AccordionCard/AccordionCard.tsx | 45 ++++++++------- .../AccordionList/AccordionListItem.tsx | 27 +++++---- .../common/BucketCard/BucketCard.tsx | 5 +- .../common/LadderCard/LadderCard.tsx | 3 +- .../common/Typography/Typography.tsx | 55 ++++++++++--------- .../src/components/common/Typography/index.ts | 2 +- .../AdvancementLevel/AdvancementLevel.tsx | 21 ++++--- .../modules/Breadcrumbs/Breadcrumbs.tsx | 8 +-- .../modules/BucketDetails/BucketDetails.tsx | 5 +- .../modules/LadderDetails/LadderDetails.tsx | 19 +++---- .../modules/LadderTabs/LadderTabs.tsx | 3 +- 16 files changed, 117 insertions(+), 100 deletions(-) diff --git a/frontend/src/app/(app)/documentation/page.tsx b/frontend/src/app/(app)/documentation/page.tsx index 5a46bdc2..05b6d576 100644 --- a/frontend/src/app/(app)/documentation/page.tsx +++ b/frontend/src/app/(app)/documentation/page.tsx @@ -1,7 +1,9 @@ +import {Typography} from "@app/components/common/Typography"; + export default function Documentation() { return (
-

Documentation

+ Documentation
); } diff --git a/frontend/src/app/(app)/library/page.tsx b/frontend/src/app/(app)/library/page.tsx index 01de50c2..071785e3 100644 --- a/frontend/src/app/(app)/library/page.tsx +++ b/frontend/src/app/(app)/library/page.tsx @@ -1,13 +1,14 @@ import { LadderCard } from '@app/components/common/LadderCard'; import { getLadders } from '@app/api/ladder'; +import {Typography} from "@app/components/common/Typography"; export default async function LibraryPage() { const data = await getLadders(); return (
-

CPF Library

-

Select a career path to view the details.

+ CPF Library + Select a career path to view the details.
{data.map((ladder) => ( diff --git a/frontend/src/app/(app)/my-space/page.tsx b/frontend/src/app/(app)/my-space/page.tsx index 0f62e372..4fabc8b9 100644 --- a/frontend/src/app/(app)/my-space/page.tsx +++ b/frontend/src/app/(app)/my-space/page.tsx @@ -1,7 +1,9 @@ +import { Typography } from '@app/components/common/Typography'; + export default function MySpace() { return (
-

My Space

+ My Space
); } diff --git a/frontend/src/app/(app)/page.tsx b/frontend/src/app/(app)/page.tsx index 625d85d8..b3f11323 100644 --- a/frontend/src/app/(app)/page.tsx +++ b/frontend/src/app/(app)/page.tsx @@ -1,5 +1,6 @@ +import { redirect } from 'next/navigation'; +import { routes } from '@app/constants'; + export default function Home() { - return ( -
We shall see
- ); + redirect(routes.mySpace.index); } diff --git a/frontend/src/app/(app)/people/page.tsx b/frontend/src/app/(app)/people/page.tsx index 5cf04b3e..8308513b 100644 --- a/frontend/src/app/(app)/people/page.tsx +++ b/frontend/src/app/(app)/people/page.tsx @@ -1,7 +1,9 @@ +import {Typography} from "@app/components/common/Typography"; + export default function People() { return (
-

People

+ People
); } diff --git a/frontend/src/components/common/AccordionCard/AccordionCard.tsx b/frontend/src/components/common/AccordionCard/AccordionCard.tsx index 858fc88f..88da93fe 100644 --- a/frontend/src/components/common/AccordionCard/AccordionCard.tsx +++ b/frontend/src/components/common/AccordionCard/AccordionCard.tsx @@ -2,6 +2,7 @@ import { PropsWithChildren, useEffect, useState } from 'react'; import { ChevronRightIcon } from '@app/static/icons/ChevronRightIcon'; import { generateClassNames } from '@app/utils'; import { AccordionCardProps } from './AccordionCard.interface'; +import {Typography} from "@app/components/common/Typography"; export const AccordionCard = ({ title, @@ -20,27 +21,29 @@ export const AccordionCard = ({ return (
-

- -

+ {children ? (
{children} diff --git a/frontend/src/components/common/AccordionList/AccordionListItem.tsx b/frontend/src/components/common/AccordionList/AccordionListItem.tsx index bc4c0246..a8e9f9a8 100644 --- a/frontend/src/components/common/AccordionList/AccordionListItem.tsx +++ b/frontend/src/components/common/AccordionList/AccordionListItem.tsx @@ -2,26 +2,25 @@ import { PropsWithChildren, useState } from 'react'; import { ChevronRightIcon } from '@app/static/icons/ChevronRightIcon'; import { generateClassNames } from '@app/utils'; import { AccordionListItemProps } from './AccordionList.interface'; +import {Typography} from "@app/components/common/Typography"; export const AccordionListItem = ({ title, children }: PropsWithChildren) => { const [isOpen, setOpen] = useState(false); return (
-

- -

+ {children ? (
{children} diff --git a/frontend/src/components/common/BucketCard/BucketCard.tsx b/frontend/src/components/common/BucketCard/BucketCard.tsx index 07580ebd..13c1e4c8 100644 --- a/frontend/src/components/common/BucketCard/BucketCard.tsx +++ b/frontend/src/components/common/BucketCard/BucketCard.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; import { BucketCardProps } from './BucketCard.interface'; import { ChevronRightIcon } from '@app/static/icons/ChevronRightIcon'; import { routes } from '@app/constants'; +import { Typography } from '@app/components/common/Typography'; export const BucketCard = ({ bucket, ladderSlug }: BucketCardProps) => { const { bucketSlug, bucketName, description } = bucket; @@ -12,12 +13,12 @@ export const BucketCard = ({ bucket, ladderSlug }: BucketCardProps) => { className="flex cursor-pointer flex-col gap-2 rounded-2xl border border-navy-200 bg-white p-6 hover:bg-navy-100" >
-

{bucketName}

+ {bucketName}
-

{description}

+ {description} ); }; diff --git a/frontend/src/components/common/LadderCard/LadderCard.tsx b/frontend/src/components/common/LadderCard/LadderCard.tsx index 21528538..a0fe6988 100644 --- a/frontend/src/components/common/LadderCard/LadderCard.tsx +++ b/frontend/src/components/common/LadderCard/LadderCard.tsx @@ -1,12 +1,13 @@ import Link from 'next/link'; import { LadderCardInterface } from './LadderCard.interface'; import { routes } from '@app/constants'; +import {Typography} from "@app/components/common/Typography"; export const LadderCard = ({ ladderName, ladderSlug }: LadderCardInterface) => ( -

{ladderName}

+ {ladderName} ); diff --git a/frontend/src/components/common/Typography/Typography.tsx b/frontend/src/components/common/Typography/Typography.tsx index 4e08e1b1..c56ca1a2 100644 --- a/frontend/src/components/common/Typography/Typography.tsx +++ b/frontend/src/components/common/Typography/Typography.tsx @@ -1,19 +1,20 @@ import React, { PropsWithChildren } from 'react'; import { TypographyProps, TypographyVariants } from '@app/components/common/Typography/Typography.interface'; +import {generateClassNames} from "@app/utils"; const variantsStyles: { [key in TypographyVariants]: string; } = { - 'hint/caps-medium': 'text-xs tracking-[.6em] uppercase font-medium', - 'hint/regular': 'text-xs tracking-[.2em] font-normal', + 'hint/caps-medium': 'text-xs tracking-widest uppercase font-medium', + 'hint/regular': 'text-xs tracking-wider font-normal', 'hint/medium': 'text-xs font-medium', 'hint/semibold': 'text-xs font-semibold', 'hint/bold': 'text-xs font-bold', - 'body-s/regular': 'text-sm tracking-[.1em] font-normal', - 'body-s/medium': 'text-sm tracking-[.2em] font-medium', - 'body-s/semibold': 'text-sm tracking-[.2em] font-semibold', - 'body-s/bold': 'text-sm tracking-[.1em] font-bold', - 'body-m/regular': 'text-base tracking-[.2em] font-normal', + 'body-s/regular': 'text-sm tracking-wide font-normal', + 'body-s/medium': 'text-sm tracking-wider font-medium', + 'body-s/semibold': 'text-sm tracking-wider font-semibold', + 'body-s/bold': 'text-sm tracking-wide font-bold', + 'body-m/regular': 'text-base tracking-wider font-normal', 'body-m/medium': 'text-base font-medium', 'body-m/semibold': 'text-base font-semibold', 'body-m/bold': 'text-base font-bold', @@ -49,23 +50,27 @@ export const Typography = ({ className, children, }: PropsWithChildren) => { - const classnames = `navy-900 ${variantsStyles[variant]} ${className}`; + const classnames = generateClassNames( + 'text-navy-900', + variantsStyles[variant], + className ?? '', + ); - switch (as) { - case 'h1': - return

{children}

; - case 'h2': - return

{children}

; - case 'h3': - return

{children}

; - case 'h4': - return

{children}

; - case 'h5': - return
{children}
; - case 'h6': - return

{children}

; - case 'p': - default: - return

{children}

; - } + switch (as) { + case 'h1': + return

{children}

; + case 'h2': + return

{children}

; + case 'h3': + return

{children}

; + case 'h4': + return

{children}

; + case 'h5': + return
{children}
; + case 'h6': + return

{children}

; + case 'p': + default: + return

{children}

; + } }; diff --git a/frontend/src/components/common/Typography/index.ts b/frontend/src/components/common/Typography/index.ts index 6f8ebcfb..5cbb1cc8 100644 --- a/frontend/src/components/common/Typography/index.ts +++ b/frontend/src/components/common/Typography/index.ts @@ -1 +1 @@ -export {Typography} from './Typography'; +export { Typography } from './Typography'; diff --git a/frontend/src/components/modules/AdvancementLevel/AdvancementLevel.tsx b/frontend/src/components/modules/AdvancementLevel/AdvancementLevel.tsx index 86df7a56..c2b9780a 100644 --- a/frontend/src/components/modules/AdvancementLevel/AdvancementLevel.tsx +++ b/frontend/src/components/modules/AdvancementLevel/AdvancementLevel.tsx @@ -6,6 +6,8 @@ import { Modal } from '@app/components/common/Modal'; import { AdvancementLevelProps } from './AdvancemetLevel.interface'; import { useAdvancementLevel } from '@app/components/modules/AdvancementLevel/AdvancementLevel.hooks'; import { Markdown } from '@app/components/common/Markdown'; +import {Typography} from "@app/components/common/Typography"; +import {Button} from "@app/components/common/Button"; export const AdvancementLevel: React.FC = ({ showVerticalLine, data }) => { const { hideModal, openModal, toggleAccordionOpen, modalOpen, accordionOpen } = useAdvancementLevel(); @@ -14,7 +16,7 @@ export const AdvancementLevel: React.FC = ({ showVertical const shouldBeExpandedByDefault = Object.keys(data.categories).length === 1; return ( -
+
{showVerticalLine &&
}
-
+
{accordionOpen && ( <> {projects.length > 0 && ( - + )} {Object.entries(categories).map(([category, skills]) => ( { return ( @@ -15,12 +16,11 @@ export const Breadcrumbs = ({ breadcrumbs }: BreadcrumbsProps) => { )} - {breadcrumb.label} + {breadcrumb.label}
diff --git a/frontend/src/components/modules/BucketDetails/BucketDetails.tsx b/frontend/src/components/modules/BucketDetails/BucketDetails.tsx index 1cbf64c9..ba0a84e1 100644 --- a/frontend/src/components/modules/BucketDetails/BucketDetails.tsx +++ b/frontend/src/components/modules/BucketDetails/BucketDetails.tsx @@ -1,5 +1,6 @@ import { BucketDetailsProps } from './BucketDetails.interface'; import { AdvancementLevel } from '@app/components/modules/AdvancementLevel'; +import {Typography} from "@app/components/common/Typography"; export const BucketDetails: React.FC = ({ data }) => { const { bucketName, description, advancementLevels } = data; @@ -9,8 +10,8 @@ export const BucketDetails: React.FC = ({ data }) => {
-

{bucketName}

-

{description}

+ {bucketName} + {description}
diff --git a/frontend/src/components/modules/LadderDetails/LadderDetails.tsx b/frontend/src/components/modules/LadderDetails/LadderDetails.tsx index f395c996..c1c1b33e 100644 --- a/frontend/src/components/modules/LadderDetails/LadderDetails.tsx +++ b/frontend/src/components/modules/LadderDetails/LadderDetails.tsx @@ -5,20 +5,19 @@ import { LadderBandBucket } from '@app/types/common'; import { BucketCard } from '@app/components/common/BucketCard'; import { AccordionCard } from '@app/components/common/AccordionCard'; import { AccordionList } from '@app/components/common/AccordionList'; +import {Typography} from "@app/components/common/Typography"; export const LadderDetails = ({ ladder, ladderName, band, ladderSlug }: LadderDetailsProps) => { return (
-

- Band {band}: {ladderName} -

-

Salary range: {ladder.salaryRange}

+ Band {band}: {ladderName} + Salary range: {ladder.salaryRange}
-
-

Threshold

+
+ Threshold
-

{ladder.threshold}

+ {ladder.threshold}
-

Buckets you need to complete to get on this band:

+ Buckets you need to complete to get on this band:
-

Hard skills

+ Hard skills
{ladder.hardSkillBuckets.map((bucket: LadderBandBucket) => ( @@ -41,7 +40,7 @@ export const LadderDetails = ({ ladder, ladderName, band, ladderSlug }: LadderDe
-

Soft skills

+ Soft skills
diff --git a/frontend/src/components/modules/LadderTabs/LadderTabs.tsx b/frontend/src/components/modules/LadderTabs/LadderTabs.tsx index fb98b404..4a61168d 100644 --- a/frontend/src/components/modules/LadderTabs/LadderTabs.tsx +++ b/frontend/src/components/modules/LadderTabs/LadderTabs.tsx @@ -4,6 +4,7 @@ import { generateBandGrouping } from './utils'; import { LadderTabsProps, LadderInterface } from './LadderTabs.interface'; import { generateClassNames } from '@app/utils'; import { Button } from '@app/components/common/Button'; +import {Typography} from "@app/components/common/Typography"; export const LadderTabs: React.FC = ({ maximumLadders, activeLadder, ladderOnClick }) => { const generateLadders = useCallback((maxLadders: number): LadderInterface => generateBandGrouping(maxLadders), []); @@ -15,7 +16,7 @@ export const LadderTabs: React.FC = ({ maximumLadders, activeLa {Object.keys(ladders).map((positionName: string, index: number) => (
-

{positionName}

+ {positionName} {ladders[positionName].map((ladder: number, index: number) => ( {accordionOpen && ( <> {projects.length > 0 && ( - + )} {Object.entries(categories).map(([category, skills]) => ( { return ( @@ -14,13 +14,15 @@ export const Breadcrumbs = ({ breadcrumbs }: BreadcrumbsProps) => { {index !== 0 && (
diff --git a/frontend/src/components/modules/BucketDetails/BucketDetails.tsx b/frontend/src/components/modules/BucketDetails/BucketDetails.tsx index ba0a84e1..4c7ba687 100644 --- a/frontend/src/components/modules/BucketDetails/BucketDetails.tsx +++ b/frontend/src/components/modules/BucketDetails/BucketDetails.tsx @@ -1,6 +1,6 @@ import { BucketDetailsProps } from './BucketDetails.interface'; import { AdvancementLevel } from '@app/components/modules/AdvancementLevel'; -import {Typography} from "@app/components/common/Typography"; +import { Typography } from '@app/components/common/Typography'; export const BucketDetails: React.FC = ({ data }) => { const { bucketName, description, advancementLevels } = data; @@ -10,8 +10,12 @@ export const BucketDetails: React.FC = ({ data }) => {
- {bucketName} - {description} + + {bucketName} + + + {description} +
diff --git a/frontend/src/components/modules/LadderDetails/LadderDetails.tsx b/frontend/src/components/modules/LadderDetails/LadderDetails.tsx index c1c1b33e..b0f60627 100644 --- a/frontend/src/components/modules/LadderDetails/LadderDetails.tsx +++ b/frontend/src/components/modules/LadderDetails/LadderDetails.tsx @@ -5,19 +5,25 @@ import { LadderBandBucket } from '@app/types/common'; import { BucketCard } from '@app/components/common/BucketCard'; import { AccordionCard } from '@app/components/common/AccordionCard'; import { AccordionList } from '@app/components/common/AccordionList'; -import {Typography} from "@app/components/common/Typography"; +import { Typography } from '@app/components/common/Typography'; export const LadderDetails = ({ ladder, ladderName, band, ladderSlug }: LadderDetailsProps) => { return (
- Band {band}: {ladderName} - Salary range: {ladder.salaryRange} + + Band {band}: {ladderName} + + + Salary range: {ladder.salaryRange} +
- Threshold + + Threshold +
- Buckets you need to complete to get on this band: + + Buckets you need to complete to get on this band: +
- Hard skills + + Hard skills +
{ladder.hardSkillBuckets.map((bucket: LadderBandBucket) => ( @@ -40,7 +50,9 @@ export const LadderDetails = ({ ladder, ladderName, band, ladderSlug }: LadderDe
- Soft skills + + Soft skills +
diff --git a/frontend/src/components/modules/LadderTabs/LadderTabs.tsx b/frontend/src/components/modules/LadderTabs/LadderTabs.tsx index 4a61168d..edc66e3a 100644 --- a/frontend/src/components/modules/LadderTabs/LadderTabs.tsx +++ b/frontend/src/components/modules/LadderTabs/LadderTabs.tsx @@ -4,7 +4,7 @@ import { generateBandGrouping } from './utils'; import { LadderTabsProps, LadderInterface } from './LadderTabs.interface'; import { generateClassNames } from '@app/utils'; import { Button } from '@app/components/common/Button'; -import {Typography} from "@app/components/common/Typography"; +import { Typography } from '@app/components/common/Typography'; export const LadderTabs: React.FC = ({ maximumLadders, activeLadder, ladderOnClick }) => { const generateLadders = useCallback((maxLadders: number): LadderInterface => generateBandGrouping(maxLadders), []); @@ -16,7 +16,9 @@ export const LadderTabs: React.FC = ({ maximumLadders, activeLa {Object.keys(ladders).map((positionName: string, index: number) => (
- {positionName} + + {positionName} + {ladders[positionName].map((ladder: number, index: number) => (