From 79be7f52522aeeed940aa1e5a14ff1ee2a00d5f4 Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 5 Oct 2023 09:59:19 -0600 Subject: [PATCH 01/17] feat: [Paragraph] Create component + tests + stories --- src/components/Paragraph/Paragraph.test.tsx | 19 +++++++++++ src/components/Paragraph/Paragraph.tsx | 29 +++++++++++++++++ .../Paragraph/Paragraphs.stories.tsx | 32 +++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 src/components/Paragraph/Paragraph.test.tsx create mode 100644 src/components/Paragraph/Paragraph.tsx create mode 100644 src/components/Paragraph/Paragraphs.stories.tsx diff --git a/src/components/Paragraph/Paragraph.test.tsx b/src/components/Paragraph/Paragraph.test.tsx new file mode 100644 index 00000000..b9a0211e --- /dev/null +++ b/src/components/Paragraph/Paragraph.test.tsx @@ -0,0 +1,19 @@ +import '@testing-library/jest-dom'; +import { render, screen } from '@testing-library/react'; +import { Paragraph } from './Paragraph'; + +describe('', () => { + const helperText = 'helperText goes here'; + + it('renders Body text', () => { + render({helperText}); + expect(screen.getByText(helperText)).toBeInTheDocument(); + }); + + it('renders Lead paragraph', () => { + render({helperText}); + const element = screen.getByText(helperText); + expect(element).toBeInTheDocument(); + expect(element.classList.contains('lead-paragraph')).toBe(true); + }); +}); diff --git a/src/components/Paragraph/Paragraph.tsx b/src/components/Paragraph/Paragraph.tsx new file mode 100644 index 00000000..806052ce --- /dev/null +++ b/src/components/Paragraph/Paragraph.tsx @@ -0,0 +1,29 @@ +import classnames from 'classnames'; + +interface ParagraphProperties extends React.HTMLProps { + isLead?: boolean; +} + +/** + * Paragraph text should provide an efficient and pleasant experience on every viewport size. Readable text makes good use of alignment, spacing, line length and height, and contrast. + * + * Source: https://cfpb.github.io/design-system/foundation/paragraphs + */ +export function Paragraph({ + children, + isLead, + className, + ...properties +}: ParagraphProperties): JSX.Element { + const cnames = [className]; + + if (isLead) cnames.push('lead-paragraph'); + + return ( +

+ {children} +

+ ); +} + +export default Paragraph; diff --git a/src/components/Paragraph/Paragraphs.stories.tsx b/src/components/Paragraph/Paragraphs.stories.tsx new file mode 100644 index 00000000..07b62cde --- /dev/null +++ b/src/components/Paragraph/Paragraphs.stories.tsx @@ -0,0 +1,32 @@ +import type { Meta } from '@storybook/react'; +import { Paragraph } from './Paragraph'; + +/** + * Paragraph text should provide an efficient and pleasant experience on every viewport size. Readable text makes good use of alignment, spacing, line length and height, and contrast. + * + * Source: https://cfpb.github.io/design-system/foundation/paragraphs + */ +const meta: Meta = { + title: 'Components (Verified)/Paragraphs', + component: Paragraph +}; + +export default meta; + +const text = + 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta numquam, dolorum rerum eaque delectus aut magnam quo eos nemo facere consequatur repellat minus commodi. Autem sapiente itaque molestiae cum aliquid!'; + +export const Body = { + name: 'Body text', + args: { + children: text + } +}; + +export const Lead = { + name: 'Lead paragraph', + args: { + children: text, + isLead: true + } +}; From 98474e9fd46f31a1e4ac299d37842a130e85231a Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 5 Oct 2023 10:04:44 -0600 Subject: [PATCH 02/17] feat: [TextIntroduction] Create component + tests + stories --- .../TextIntroduction.stories.tsx | 17 +++++ .../TextIntroduction.test.tsx | 22 +++++++ .../TextIntroduction/TextIntroduction.tsx | 62 +++++++++++++++++++ .../TextIntroduction/testHelpers.tsx | 16 +++++ src/index.ts | 2 + 5 files changed, 119 insertions(+) create mode 100644 src/components/TextIntroduction/TextIntroduction.stories.tsx create mode 100644 src/components/TextIntroduction/TextIntroduction.test.tsx create mode 100644 src/components/TextIntroduction/TextIntroduction.tsx create mode 100644 src/components/TextIntroduction/testHelpers.tsx diff --git a/src/components/TextIntroduction/TextIntroduction.stories.tsx b/src/components/TextIntroduction/TextIntroduction.stories.tsx new file mode 100644 index 00000000..af5b0fdc --- /dev/null +++ b/src/components/TextIntroduction/TextIntroduction.stories.tsx @@ -0,0 +1,17 @@ +import type { Meta } from '@storybook/react'; +import { TextIntroduction } from './TextIntroduction'; +import placeholders from './testHelpers'; + +const meta: Meta = { + title: 'Components (Verified)/Text introductions', + component: TextIntroduction +}; + +export default meta; + +export const Standard = { + name: 'Standard text introduction', + args: { + ...placeholders + } +}; diff --git a/src/components/TextIntroduction/TextIntroduction.test.tsx b/src/components/TextIntroduction/TextIntroduction.test.tsx new file mode 100644 index 00000000..7c2cf6de --- /dev/null +++ b/src/components/TextIntroduction/TextIntroduction.test.tsx @@ -0,0 +1,22 @@ +import '@testing-library/jest-dom'; +import { render, screen } from '@testing-library/react'; +import { TextIntroduction } from './TextIntroduction'; +import placeholders from './testHelpers'; + +describe('', () => { + it('renders all elements when provided', () => { + render(); + expect(screen.getByText(placeholders.heading)).toBeInTheDocument(); + expect(screen.getByText(placeholders.subheading)).toBeInTheDocument(); + expect(screen.getByText(placeholders.description)).toBeInTheDocument(); + expect(screen.getByText('Link one hypertext text')).toBeInTheDocument(); + }); + + it('supports setting top/bottom as flush (remove margin)', () => { + render(); + const element = screen.getByTestId('text-intro-wrapper'); + expect(element).toBeInTheDocument(); + expect(element.classList.contains('block__flush-top')).toBe(true); + expect(element.classList.contains('block__flush-bottom')).toBe(true); + }); +}); diff --git a/src/components/TextIntroduction/TextIntroduction.tsx b/src/components/TextIntroduction/TextIntroduction.tsx new file mode 100644 index 00000000..dc86e773 --- /dev/null +++ b/src/components/TextIntroduction/TextIntroduction.tsx @@ -0,0 +1,62 @@ +import classnames from 'classnames'; +import { cloneElement, type ReactNode } from 'react'; +import { Heading } from '../Headings/Heading'; +import List from '../List/List'; +import ListItem from '../List/ListItem'; +import { Paragraph } from '../Paragraph/Paragraph'; + +interface TextIntroductionProperties extends React.HTMLProps { + // Page title + heading: string; + // Lead paragraph + subheading: string; + // Descriptive paragraph + description?: ReactNode | string; + // Call-to-action + callToAction?: JSX.Element; + // Remove top margin? + isFlushTop?: boolean; + // Remove bottom margin? + isFlushBottom?: boolean; +} + +/** + * The text introduction is the standard page introduction pattern used across all pages that do not have a hero or item introduction. They introduce a page, or collection of pages, with a brief description of the goals of that section. + * + * Source: https://cfpb.github.io/design-system/patterns/text-introductions + */ +export const TextIntroduction = ({ + heading, + subheading, + description, + callToAction, + className, + isFlushTop, + isFlushBottom, + ...properties +}: TextIntroductionProperties): JSX.Element => { + const cnames = ['block', className]; + if (isFlushTop) cnames.push('block__flush-top'); + if (isFlushBottom) cnames.push('block__flush-bottom'); + + const call2action = callToAction && ( + + {cloneElement(callToAction, { type: 'list' })} + + ); + + return ( +
+ {heading} + {subheading} + {description ?

{description}

: null} + {call2action} +
+ ); +}; + +export default TextIntroduction; diff --git a/src/components/TextIntroduction/testHelpers.tsx b/src/components/TextIntroduction/testHelpers.tsx new file mode 100644 index 00000000..98a7048f --- /dev/null +++ b/src/components/TextIntroduction/testHelpers.tsx @@ -0,0 +1,16 @@ +import Link from '../Link/Link'; + +const subheading = + 'Subheader, lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae velit quibusdam voluptatem dolor? At, ea dicta. Ipsum sed qui quos iure, beatae voluptas. Repellat pariatur nostrum esse aperiam! Tempore, odit?'; + +const description = + 'Description paragraph, Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque beatae necessitatibus fugiat nesciunt possimus iste eaque vero voluptatum ab dignissimos, repellat, tempora, perspiciatis et repellendus ea quia eveniet hic molestiae.'; + +const callToAction = Link one hypertext text; + +export default { + heading: 'Heading 1', + description, + subheading, + callToAction +}; diff --git a/src/index.ts b/src/index.ts index 8c4a0f24..585d6565 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,6 +36,7 @@ export { default as Navbar } from './components/Navbar/Navbar'; export { Notification } from './components/Notification/Notification'; export { default as PageHeader } from './components/PageHeader/PageHeader'; export { Pagination } from './components/Pagination/Pagination'; +export { Paragraph } from './components/Paragraph/Paragraph'; export { RadioButton } from './components/RadioButton/RadioButton'; export { TableComplex, @@ -44,5 +45,6 @@ export { } from './components/Table/Table'; export { Tagline } from './components/Tagline/Tagline'; export { TextInput } from './components/TextInput/TextInput'; +export { TextIntroduction } from './components/TextIntroduction/TextIntroduction'; export { default as Well } from './components/Well/Well'; From 39311befbe254270f20633a34a6f140dd264afd5 Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 5 Oct 2023 10:31:40 -0600 Subject: [PATCH 03/17] feat: [Storybook] Set default theme to "light" instead of "dark" --- .storybook/preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.storybook/preview.js b/.storybook/preview.js index 63a108de..696c8941 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -26,7 +26,7 @@ export const parameters = { } }, darkMode: { - current: 'dark', + current: 'light', // Override the default dark theme dark: { ...themes.dark, From ed86d041581ce1250c91f6e893d2be32f8ae996d Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 5 Oct 2023 11:24:26 -0600 Subject: [PATCH 04/17] fix:[Paragraph] Remove duplicate intro paragraph --- src/components/Paragraph/Paragraphs.stories.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/Paragraph/Paragraphs.stories.tsx b/src/components/Paragraph/Paragraphs.stories.tsx index 07b62cde..72dc4487 100644 --- a/src/components/Paragraph/Paragraphs.stories.tsx +++ b/src/components/Paragraph/Paragraphs.stories.tsx @@ -1,11 +1,6 @@ import type { Meta } from '@storybook/react'; import { Paragraph } from './Paragraph'; -/** - * Paragraph text should provide an efficient and pleasant experience on every viewport size. Readable text makes good use of alignment, spacing, line length and height, and contrast. - * - * Source: https://cfpb.github.io/design-system/foundation/paragraphs - */ const meta: Meta = { title: 'Components (Verified)/Paragraphs', component: Paragraph From 0328bfa8b4c16166fa98dbe322ce03060f37f9ec Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 12 Oct 2023 16:22:06 -0600 Subject: [PATCH 05/17] [Paragraph] Update placeholder text --- .../Paragraph/Paragraphs.stories.tsx | 9 ++++----- .../TextIntroduction/TextIntroduction.less | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 src/components/TextIntroduction/TextIntroduction.less diff --git a/src/components/Paragraph/Paragraphs.stories.tsx b/src/components/Paragraph/Paragraphs.stories.tsx index 72dc4487..2a3fddb1 100644 --- a/src/components/Paragraph/Paragraphs.stories.tsx +++ b/src/components/Paragraph/Paragraphs.stories.tsx @@ -8,20 +8,19 @@ const meta: Meta = { export default meta; -const text = - 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta numquam, dolorum rerum eaque delectus aut magnam quo eos nemo facere consequatur repellat minus commodi. Autem sapiente itaque molestiae cum aliquid!'; - export const Body = { name: 'Body text', args: { - children: text + children: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.' } }; export const Lead = { name: 'Lead paragraph', args: { - children: text, + children: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', isLead: true } }; diff --git a/src/components/TextIntroduction/TextIntroduction.less b/src/components/TextIntroduction/TextIntroduction.less new file mode 100644 index 00000000..dfbd609e --- /dev/null +++ b/src/components/TextIntroduction/TextIntroduction.less @@ -0,0 +1,19 @@ +// Styles in this file are overrides of the CFPB Design System + +@import (reference) "@cfpb/cfpb-design-system/src/cfpb-design-system.less"; + +.text-intro.block { + margin-top: 45px; +} + +.text-intro .lead-paragraph, +.text-intro p { + margin-bottom: 30px; +} + +.respond-to-max(@bp-xs-max, { + .text-intro .lead-paragraph, + .text-intro p { + margin-bottom: 15px; + } +}); From 1af90a838d5fd312b65d3f4241fa52ed20d9e64b Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 12 Oct 2023 17:21:48 -0600 Subject: [PATCH 06/17] fix: [TextIntroduction] Apply customized spacing to component elements --- src/components/TextIntroduction/TextIntroduction.less | 2 +- src/components/TextIntroduction/TextIntroduction.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/TextIntroduction/TextIntroduction.less b/src/components/TextIntroduction/TextIntroduction.less index dfbd609e..ae80e76e 100644 --- a/src/components/TextIntroduction/TextIntroduction.less +++ b/src/components/TextIntroduction/TextIntroduction.less @@ -1,4 +1,4 @@ -// Styles in this file are overrides of the CFPB Design System +// WARNING: Styles in this file are intentional overrides of the CFPB Design System @import (reference) "@cfpb/cfpb-design-system/src/cfpb-design-system.less"; diff --git a/src/components/TextIntroduction/TextIntroduction.tsx b/src/components/TextIntroduction/TextIntroduction.tsx index dc86e773..26544396 100644 --- a/src/components/TextIntroduction/TextIntroduction.tsx +++ b/src/components/TextIntroduction/TextIntroduction.tsx @@ -4,6 +4,7 @@ import { Heading } from '../Headings/Heading'; import List from '../List/List'; import ListItem from '../List/ListItem'; import { Paragraph } from '../Paragraph/Paragraph'; +import './TextIntroduction.less'; interface TextIntroductionProperties extends React.HTMLProps { // Page title @@ -35,7 +36,8 @@ export const TextIntroduction = ({ isFlushBottom, ...properties }: TextIntroductionProperties): JSX.Element => { - const cnames = ['block', className]; + const cnames = ['block', 'text-intro', className]; + if (isFlushTop) cnames.push('block__flush-top'); if (isFlushBottom) cnames.push('block__flush-bottom'); From 734be8b552c69d5127fe4be4a611d35a9c3e697b Mon Sep 17 00:00:00 2001 From: Meis Date: Fri, 13 Oct 2023 16:47:02 -0600 Subject: [PATCH 07/17] feat: [Storybook] Set line-height to 22px --- src/assets/styles/_shared.less | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/assets/styles/_shared.less b/src/assets/styles/_shared.less index 06e728f4..3f052e44 100644 --- a/src/assets/styles/_shared.less +++ b/src/assets/styles/_shared.less @@ -39,3 +39,10 @@ font-family: 'Avenir Next', Arial, sans-serif; } } + +/* +Apply a global line-height that doesn't interfere with component Stories that have their own line-height settings. +*/ +:where(p:not(.sb-story *, #storybook-root *)){ + line-height: 22px !important; +} From 88e23e517bfaf11605ed8a56c8624b0be4ec11f5 Mon Sep 17 00:00:00 2001 From: Meis Date: Fri, 13 Oct 2023 16:50:35 -0600 Subject: [PATCH 08/17] deps: Remove storybook-dark-mode --- .storybook/main.js | 3 +-- package.json | 1 - yarn.lock | 63 +++------------------------------------------- 3 files changed, 4 insertions(+), 63 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 59c4bb9b..5470a9ac 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -6,8 +6,7 @@ module.exports = { '@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y', - 'display-element-css', - 'storybook-dark-mode' + 'display-element-css' ], docs: { autodocs: true, diff --git a/package.json b/package.json index e8e27a6c..fb785ea2 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,6 @@ "prettier": "2.7.1", "start-server-and-test": "1.14.0", "storybook": "^7.0.6", - "storybook-dark-mode": "^3.0.1", "stylelint": "14.15.0", "stylelint-config-prettier": "9.0.4", "stylelint-config-standard": "29.0.0", diff --git a/yarn.lock b/yarn.lock index 5ffcb814..8ba5d510 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3656,38 +3656,6 @@ __metadata: languageName: node linkType: hard -"@storybook/addons@npm:^7.0.0": - version: 7.4.3 - resolution: "@storybook/addons@npm:7.4.3" - dependencies: - "@storybook/manager-api": 7.4.3 - "@storybook/preview-api": 7.4.3 - "@storybook/types": 7.4.3 - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 6572fe0f389e6c9ec97e0f49a7212b0c9dd8196d794e0557d743397b6a69bc472638b879b63b61dc03d5dda78052d74d07460df62afea7cecbfb9d39eef35171 - languageName: node - linkType: hard - -"@storybook/api@npm:^7.0.0": - version: 7.4.3 - resolution: "@storybook/api@npm:7.4.3" - dependencies: - "@storybook/client-logger": 7.4.3 - "@storybook/manager-api": 7.4.3 - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - checksum: bf1afa0ae75e6e959e2d19c0fac27e63ab2ba83e79cd4eac461c8eb216127b02741ad7ae75dae7353fed0192b3e1e76f69309de1fdbc6e110c7a28a1b9caa029 - languageName: node - linkType: hard - "@storybook/blocks@npm:7.4.3": version: 7.4.3 resolution: "@storybook/blocks@npm:7.4.3" @@ -3938,7 +3906,7 @@ __metadata: languageName: node linkType: hard -"@storybook/components@npm:7.4.3, @storybook/components@npm:^7.0.0": +"@storybook/components@npm:7.4.3": version: 7.4.3 resolution: "@storybook/components@npm:7.4.3" dependencies: @@ -4000,7 +3968,7 @@ __metadata: languageName: node linkType: hard -"@storybook/core-events@npm:7.4.3, @storybook/core-events@npm:^7.0.0": +"@storybook/core-events@npm:7.4.3": version: 7.4.3 resolution: "@storybook/core-events@npm:7.4.3" dependencies: @@ -4433,7 +4401,7 @@ __metadata: languageName: node linkType: hard -"@storybook/theming@npm:7.4.3, @storybook/theming@npm:^7.0.0, @storybook/theming@npm:^7.3.2": +"@storybook/theming@npm:7.4.3, @storybook/theming@npm:^7.3.2": version: 7.4.3 resolution: "@storybook/theming@npm:7.4.3" dependencies: @@ -7903,7 +7871,6 @@ __metadata: react-select: ^5.7.2 start-server-and-test: 1.14.0 storybook: ^7.0.6 - storybook-dark-mode: ^3.0.1 stylelint: 14.15.0 stylelint-config-prettier: 9.0.4 stylelint-config-standard: 29.0.0 @@ -15303,30 +15270,6 @@ display-element-css@cfpb/storybook-addon-display-element-css: languageName: node linkType: hard -"storybook-dark-mode@npm:^3.0.1": - version: 3.0.1 - resolution: "storybook-dark-mode@npm:3.0.1" - dependencies: - "@storybook/addons": ^7.0.0 - "@storybook/api": ^7.0.0 - "@storybook/components": ^7.0.0 - "@storybook/core-events": ^7.0.0 - "@storybook/global": ^5.0.0 - "@storybook/theming": ^7.0.0 - fast-deep-equal: ^3.1.3 - memoizerific: ^1.11.3 - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - checksum: d04213c92e8a4af0035e80eb02b75b8da725ba7b1ecbfe050eb04cb4018d91394f08c8fe7c1b106c971b2047ef5a1ba776e78050ae1f6d7563cdfdba5e701a29 - languageName: node - linkType: hard - "storybook@npm:^7.0.6": version: 7.4.3 resolution: "storybook@npm:7.4.3" From b5330f9c5fd7f115d2f763b242ec2402313d3e24 Mon Sep 17 00:00:00 2001 From: Meis Date: Fri, 13 Oct 2023 16:51:34 -0600 Subject: [PATCH 09/17] feat: [Storybook] Refactor and update UI theme --- .storybook/manager-head.html | 25 +++++++++++++++-- .storybook/manager.js | 4 ++- .storybook/preview.js | 54 +++++++++++++----------------------- .storybook/themeCFPB.js | 52 ++++++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 39 deletions(-) create mode 100644 .storybook/themeCFPB.js diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html index 16b755e1..d61a3310 100644 --- a/.storybook/manager-head.html +++ b/.storybook/manager-head.html @@ -3,9 +3,28 @@ font-size: 15px !important; } - div.sidebar-item[data-selected="false"]:hover, + /* Sidebar hover */ + div.sidebar-item[data-selected='false']:hover, button.sidebar-item:hover { - background-color: #5a5d61 !important; + background-color: #5a5d61 !important; /* gray */ color: white !important; } - \ No newline at end of file + + /* Sidebar selected */ + div.sidebar-item[data-selected='true'] { + background-color: #257675 !important; /* teal */ + color: white !important; + } + + /* Sidebar icons */ + .sidebar-item svg { + color: black; + } + + /* Sidebar hover/selected icons */ + div.sidebar-item[data-selected='false']:hover svg, + button.sidebar-item:hover svg { + color: white; + } + + diff --git a/.storybook/manager.js b/.storybook/manager.js index d6d1c2a9..6fc4ea24 100644 --- a/.storybook/manager.js +++ b/.storybook/manager.js @@ -1,4 +1,5 @@ import { addons } from '@storybook/manager-api'; +import themeCFPB from './themeCFPB'; addons.setConfig({ sidebar: { @@ -11,5 +12,6 @@ addons.setConfig({ } return name; } - } + }, + theme: themeCFPB }); diff --git a/.storybook/preview.js b/.storybook/preview.js index 696c8941..de5399e9 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,42 +1,26 @@ import '@cfpb/cfpb-design-system/src/cfpb-design-system.less'; -import { themes } from '@storybook/theming'; -import CfpbLogo from '../src/assets/images/cfpb-logo-vertical.png'; import '../src/assets/styles/_shared.less'; +import themeCFPB from './themeCFPB'; -const sharedThemeElements = { - brandTitle: 'CFPB Design System React', - brandImage: CfpbLogo, - brandUrl: 'https://cfpb.github.io/design-system/', - brandTarget: '_blank', - fontBase: '"Avenir Next", Arial ,sans-serif' -}; - -export const parameters = { - options: { - // Determines the display order of Stories in the sidebar - storySort: { - order: ['Guides', 'Components (Verified)', 'Components (Draft)', '*'] - } - }, - actions: { argTypesRegex: '^on[A-Z].*' }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/ - } - }, - darkMode: { - current: 'light', - // Override the default dark theme - dark: { - ...themes.dark, - ...sharedThemeElements, - appBg: 'black' +export const preview = { + parameters: { + options: { + // Determines the display order of Stories in the sidebar + storySort: { + order: ['Guides', 'Components (Verified)', 'Components (Draft)', '*'] + } + }, + actions: { argTypesRegex: '^on[A-Z].*' }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/ + } }, - // Override the default light theme - light: { - ...themes.normal, - ...sharedThemeElements + docs: { + theme: themeCFPB } } }; + +export default preview; diff --git a/.storybook/themeCFPB.js b/.storybook/themeCFPB.js new file mode 100644 index 00000000..cceda541 --- /dev/null +++ b/.storybook/themeCFPB.js @@ -0,0 +1,52 @@ +import { create } from '@storybook/theming/create'; +import CfpbLogo from '../src/assets/images/cfpb-logo-vertical.png'; + +const colors = { + black: '#101820', + gray: '#5a5d61', + gray10: '#e7e8e9', + gray40: '#b4b5b6', + green10: '#f0f8eb', + teal: '#257675', + teal80: '#579695' +}; + +/** + * Note: + * Additional CSS customizations are implemented in `./manager-head.html` + */ +export default create({ + base: 'light', + + brandTitle: 'CFPB Design System React', + brandImage: CfpbLogo, + brandUrl: 'https://cfpb.github.io/design-system/', + brandTarget: '_blank', + + fontBase: '"Avenir Next", Arial ,sans-serif', + + // App + appBorderColor: colors.gray, + appContentBg: 'white', // Story overview, tool panel + + // Sidebar + appBg: colors.green10, // Background + textColor: colors.black, // Story names + textMutedColor: colors.black, // Group names + + // Toolbars + colorPrimary: colors.teal, // Selected (Controls, Actions, etc) + colorSecondary: colors.teal, // Focused text color of objects + barTextColor: colors.black, // Text & icons + barSelectedColor: colors.teal, + barBg: colors.gray10, + + // Form colors (Controls) + buttonBg: colors.gray10, + buttonBorder: colors.gray40, + booleanBg: colors.gray10, + booleanSelectedBg: colors.teal80, + inputBg: 'white', + inputBorder: colors.gray, + inputTextColor: colors.black +}); From e05db0ca84d4f72969f0fbf39d379e9c44fd3631 Mon Sep 17 00:00:00 2001 From: Meis Date: Fri, 13 Oct 2023 17:02:56 -0600 Subject: [PATCH 10/17] fix: [TextIntroduction] Apply latest component styles --- .../TextIntroduction/TextIntroduction.less | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/TextIntroduction/TextIntroduction.less b/src/components/TextIntroduction/TextIntroduction.less index ae80e76e..15d908fc 100644 --- a/src/components/TextIntroduction/TextIntroduction.less +++ b/src/components/TextIntroduction/TextIntroduction.less @@ -3,17 +3,15 @@ @import (reference) "@cfpb/cfpb-design-system/src/cfpb-design-system.less"; .text-intro.block { - margin-top: 45px; + margin-top: 0px; } .text-intro .lead-paragraph, .text-intro p { - margin-bottom: 30px; + margin-bottom: 15px; + margin-top: 0; } -.respond-to-max(@bp-xs-max, { - .text-intro .lead-paragraph, - .text-intro p { - margin-bottom: 15px; - } -}); +.text-intro p + ul { + margin-top: 15px; +} From 7563dd2d5b46eb3d28ea07b7c705f8dbf5c73aa0 Mon Sep 17 00:00:00 2001 From: Meis Date: Fri, 13 Oct 2023 17:20:06 -0600 Subject: [PATCH 11/17] docs: Note addtional places where CSS customization is implemented --- .storybook/themeCFPB.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.storybook/themeCFPB.js b/.storybook/themeCFPB.js index cceda541..2adf1d67 100644 --- a/.storybook/themeCFPB.js +++ b/.storybook/themeCFPB.js @@ -12,8 +12,9 @@ const colors = { }; /** - * Note: - * Additional CSS customizations are implemented in `./manager-head.html` + * Note: Additional CSS customizations are implemented in + * - /.storybook/manager-head.html + * - /src/assets/styles/_shared.less */ export default create({ base: 'light', From d9552e8d41a1ff64ae529e1fa991faf9b4a6a738 Mon Sep 17 00:00:00 2001 From: Meis Date: Mon, 16 Oct 2023 10:29:56 -0600 Subject: [PATCH 12/17] fix: [Storybook] Update theme --- .storybook/manager-head.html | 16 +++++----------- .storybook/themeCFPB.js | 6 +++--- src/assets/images/cfpb-logo-vertical.png | Bin 6372 -> 8169 bytes 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html index d61a3310..55577966 100644 --- a/.storybook/manager-head.html +++ b/.storybook/manager-head.html @@ -6,14 +6,14 @@ /* Sidebar hover */ div.sidebar-item[data-selected='false']:hover, button.sidebar-item:hover { - background-color: #5a5d61 !important; /* gray */ + background-color: #5a5d61 !important; color: white !important; } - /* Sidebar selected */ - div.sidebar-item[data-selected='true'] { - background-color: #257675 !important; /* teal */ - color: white !important; + /* Sidebar hover/selected icons */ + div.sidebar-item[data-selected='false']:hover svg, + button.sidebar-item:hover svg { + color: white; } /* Sidebar icons */ @@ -21,10 +21,4 @@ color: black; } - /* Sidebar hover/selected icons */ - div.sidebar-item[data-selected='false']:hover svg, - button.sidebar-item:hover svg { - color: white; - } - diff --git a/.storybook/themeCFPB.js b/.storybook/themeCFPB.js index 2adf1d67..8f3e9e21 100644 --- a/.storybook/themeCFPB.js +++ b/.storybook/themeCFPB.js @@ -31,13 +31,13 @@ export default create({ appContentBg: 'white', // Story overview, tool panel // Sidebar - appBg: colors.green10, // Background + appBg: 'white', // Background textColor: colors.black, // Story names textMutedColor: colors.black, // Group names // Toolbars - colorPrimary: colors.teal, // Selected (Controls, Actions, etc) - colorSecondary: colors.teal, // Focused text color of objects + // colorPrimary: 'color', // Purpose unknown + colorSecondary: colors.teal, // Selected (Controls, Actions, etc) barTextColor: colors.black, // Text & icons barSelectedColor: colors.teal, barBg: colors.gray10, diff --git a/src/assets/images/cfpb-logo-vertical.png b/src/assets/images/cfpb-logo-vertical.png index 10b620263b1942db94dce0ab624d7c80160ab573..3cc78b6883fc9ab7c8891d5b452d1a241e1456d1 100644 GIT binary patch literal 8169 zcmd^kg;!h4yEX(UDYQuO0ws8HhvM#5DDD)u-~dpuR-G_*+InQ9>pESJp&* z{SO9!f)Zwjg8mQ20NMUI6p$xU`=1sq7xlj_<^ujj-{zwID=+_1v&VgUfoz_-DCoPR zpkNdHIZ;v4Gf9!w^zF3tJoHpmge;t$*v&1S-&?VJJGuPPLJ{#6LW)jS9_Ao#Cr7Zm zkhdt!-v}Y3{HL3P2J|e~0xL6-=4tk|D=UXkmJt?2Nydh$G^6bsv>`S zh1A{btdO4n*camx`5XDa`u_1F!tuxX{|M$knf~32OjQg^gyY|76T>1iS;Is@p-fYh zk<{`=JoE_L{Fn7Lruc;;zcY?eIDCM44M{bijFr?IX@OFN(&?rL}^d^KG)&X^THiSG6dr1 z)$uU4)jFEFlhh$)x9(q!Be|JM)}Zt zy&5PQqcwI_d}`q?!i?#th=LDAe+J#>L2Ot09xybzuOO1gMmKzO(oZv9P9p9xQ^t06 zuC`lCOm-T|#X8F2b2kK&VYX*G#n}*&6@=_gf>-#0#?(_F2%B zWiC)tP^{8pt10QE0Xzf59UKDNLPum$cT6vRN}MVV3I zVxavw`VaQP(@)SFB~{zB{q~dQl~k#0#?=!Q#{5V8m2ZAk=yQun?@GhS zliMKBZZ_XV&11yEBARo@_EkqizbkaFp2Yf9xnA24n~29Za?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Oqyo#fJWUxg9^PHz;H&^R$u**T*%Mdx z&I>eag1w$gFCK}0?f)h7k5eToX^_W+C~v+$H90n#3L{h|_` zGkCN%30ajjPB*c04d~*+6#QH>k;w#G#ooRRWWIB1P0*&@b%|%-9Jq|fwlz-841yj4 zg(v7yXYI1rpX5H%;zhcXD2L)GK)Wo_377h4cGD4)oEwej$0?ZT>SF4kmB+;A8*Vk1 zUP>DMooGzHqtm{dT}7b}cSQ6==+v?+U}51ba7Pesd&)eG=e+`Yc2aUw90hs7YZ;+T8RdoPj165q0~TC<_s4{>3aCjn1- zdC4iA5$XcRg>E0{DIP}-k9o|w8{+;8P@KgJ?G|e(x9ZmX3E6t$Z>Jm`0ll!GTzULp ze1>!X2tpf54K&B(0pZe8xbR%1yd3+Q^ehd@+j``P#SFH1zcjr@`tatvpR#=8HKEi# zZ3*EPAD&_#oF${eq|LXeW8N*mtD7G6-K33vzTxa&!q;FQ_N`ob1ga4=vgZ!&ecuJ& zmP|05`M{&--SrF040d;zY1;53OmV0<1AmGAO|RTU@Q(xO*#&iOF~Lhf52wRAnb=l> zZ=U4+SCLuuc}cvlrSA!P8If&tHwfB-C--5Caz$20iJ}lPJO%1GS$r@vYjMa#^#${|5<(TA=^{ From 2b21d79dff461d57f67f0076374ceacf8b1c2407 Mon Sep 17 00:00:00 2001 From: Meis Date: Mon, 16 Oct 2023 13:48:08 -0600 Subject: [PATCH 13/17] WIP: Examples for spacing --- .../TextIntroduction/SpaceAdjustments.less | 6 + .../SpacingEvaluations.stories.tsx | 134 ++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 src/components/TextIntroduction/SpaceAdjustments.less create mode 100644 src/components/TextIntroduction/SpacingEvaluations.stories.tsx diff --git a/src/components/TextIntroduction/SpaceAdjustments.less b/src/components/TextIntroduction/SpaceAdjustments.less new file mode 100644 index 00000000..54bb7ebe --- /dev/null +++ b/src/components/TextIntroduction/SpaceAdjustments.less @@ -0,0 +1,6 @@ +.space-evaluation { + .lead-paragraph { + margin-top: 0px; + margin-bottom: 15px; + } +} \ No newline at end of file diff --git a/src/components/TextIntroduction/SpacingEvaluations.stories.tsx b/src/components/TextIntroduction/SpacingEvaluations.stories.tsx new file mode 100644 index 00000000..d767cc76 --- /dev/null +++ b/src/components/TextIntroduction/SpacingEvaluations.stories.tsx @@ -0,0 +1,134 @@ +import type { Meta } from '@storybook/react'; +import { cloneElement } from 'react'; +import Link from '../Link/Link'; +import List from '../List/List'; +import ListItem from '../List/ListItem'; +import './SpaceAdjustments.less'; +import { TextIntroduction } from './TextIntroduction'; +import placeholders from './testHelpers'; + +/** + * Element combinations for spacing evaluation + */ +const meta: Meta = { + title: 'Components (Verified)/Spacing Evaluations', + component: TextIntroduction +}; + +export default meta; + +export const V1 = { + name: 'Heading + Lead paragraph', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.subheading}

+
+ ) +}; + +export const V2 = { + name: 'Heading + Lead paragraph + paragraph', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.subheading}

+

{placeholders.description}

+
+ ) +}; + +export const V3 = { + name: 'Heading + Lead paragraph + paragraph + call-to-action', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.subheading}

+

{placeholders.description}

+ + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + +
+ ) +}; + +export const V4 = { + name: 'Heading + paragraph + call-to-action', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.description}

+ + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + +
+ ) +}; + +export const V5 = { + name: 'Heading + Lead paragraph + call-to-action', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.subheading}

+ + + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + + +
+ ) +}; + +export const V6 = { + name: 'Heading 1 + Lead paragraph + Heading 4 + List links/Call-to-action links', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.subheading}

+

This is an additional section header level 4

+ + + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + + + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + + +
+ ) +}; + +export const V7 = { + name: 'Heading 1 + Lead paragraph + Paragraph + Heading 4 + List links/Call-to-action links', + render: (): JSX.Element => ( +
+

{placeholders.heading}

+

{placeholders.subheading}

+

{placeholders.description}

+

This is an additional section header level 4

+ + + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + + + + {cloneElement(placeholders.callToAction, { type: 'list' })} + + + +
+ ) +}; From 4876a33c1969925ee0e51a2cc9624e023ec0121a Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 26 Oct 2023 14:38:32 -0600 Subject: [PATCH 14/17] fix: Delete SpacingEvaluation stories --- .../TextIntroduction/SpaceAdjustments.less | 6 - .../SpacingEvaluations.stories.tsx | 134 ------------------ 2 files changed, 140 deletions(-) delete mode 100644 src/components/TextIntroduction/SpaceAdjustments.less delete mode 100644 src/components/TextIntroduction/SpacingEvaluations.stories.tsx diff --git a/src/components/TextIntroduction/SpaceAdjustments.less b/src/components/TextIntroduction/SpaceAdjustments.less deleted file mode 100644 index 54bb7ebe..00000000 --- a/src/components/TextIntroduction/SpaceAdjustments.less +++ /dev/null @@ -1,6 +0,0 @@ -.space-evaluation { - .lead-paragraph { - margin-top: 0px; - margin-bottom: 15px; - } -} \ No newline at end of file diff --git a/src/components/TextIntroduction/SpacingEvaluations.stories.tsx b/src/components/TextIntroduction/SpacingEvaluations.stories.tsx deleted file mode 100644 index d767cc76..00000000 --- a/src/components/TextIntroduction/SpacingEvaluations.stories.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import type { Meta } from '@storybook/react'; -import { cloneElement } from 'react'; -import Link from '../Link/Link'; -import List from '../List/List'; -import ListItem from '../List/ListItem'; -import './SpaceAdjustments.less'; -import { TextIntroduction } from './TextIntroduction'; -import placeholders from './testHelpers'; - -/** - * Element combinations for spacing evaluation - */ -const meta: Meta = { - title: 'Components (Verified)/Spacing Evaluations', - component: TextIntroduction -}; - -export default meta; - -export const V1 = { - name: 'Heading + Lead paragraph', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.subheading}

-
- ) -}; - -export const V2 = { - name: 'Heading + Lead paragraph + paragraph', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.subheading}

-

{placeholders.description}

-
- ) -}; - -export const V3 = { - name: 'Heading + Lead paragraph + paragraph + call-to-action', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.subheading}

-

{placeholders.description}

- - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - -
- ) -}; - -export const V4 = { - name: 'Heading + paragraph + call-to-action', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.description}

- - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - -
- ) -}; - -export const V5 = { - name: 'Heading + Lead paragraph + call-to-action', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.subheading}

- - - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - - -
- ) -}; - -export const V6 = { - name: 'Heading 1 + Lead paragraph + Heading 4 + List links/Call-to-action links', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.subheading}

-

This is an additional section header level 4

- - - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - - - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - - -
- ) -}; - -export const V7 = { - name: 'Heading 1 + Lead paragraph + Paragraph + Heading 4 + List links/Call-to-action links', - render: (): JSX.Element => ( -
-

{placeholders.heading}

-

{placeholders.subheading}

-

{placeholders.description}

-

This is an additional section header level 4

- - - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - - - - {cloneElement(placeholders.callToAction, { type: 'list' })} - - - -
- ) -}; From de797422b59c0699db6eb953c2ee9072443f124e Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 26 Oct 2023 14:42:52 -0600 Subject: [PATCH 15/17] fix: [TextIntroduction] Match DS language --- src/components/TextIntroduction/TextIntroduction.test.tsx | 2 +- src/components/TextIntroduction/testHelpers.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/TextIntroduction/TextIntroduction.test.tsx b/src/components/TextIntroduction/TextIntroduction.test.tsx index 7c2cf6de..c4fe8399 100644 --- a/src/components/TextIntroduction/TextIntroduction.test.tsx +++ b/src/components/TextIntroduction/TextIntroduction.test.tsx @@ -9,7 +9,7 @@ describe('', () => { expect(screen.getByText(placeholders.heading)).toBeInTheDocument(); expect(screen.getByText(placeholders.subheading)).toBeInTheDocument(); expect(screen.getByText(placeholders.description)).toBeInTheDocument(); - expect(screen.getByText('Link one hypertext text')).toBeInTheDocument(); + expect(screen.getByText('Call-to-action link')).toBeInTheDocument(); }); it('supports setting top/bottom as flush (remove margin)', () => { diff --git a/src/components/TextIntroduction/testHelpers.tsx b/src/components/TextIntroduction/testHelpers.tsx index 98a7048f..63a5c080 100644 --- a/src/components/TextIntroduction/testHelpers.tsx +++ b/src/components/TextIntroduction/testHelpers.tsx @@ -1,12 +1,12 @@ import Link from '../Link/Link'; const subheading = - 'Subheader, lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae velit quibusdam voluptatem dolor? At, ea dicta. Ipsum sed qui quos iure, beatae voluptas. Repellat pariatur nostrum esse aperiam! Tempore, odit?'; + 'Lead paragraph lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'; const description = - 'Description paragraph, Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque beatae necessitatibus fugiat nesciunt possimus iste eaque vero voluptatum ab dignissimos, repellat, tempora, perspiciatis et repellendus ea quia eveniet hic molestiae.'; + 'Descriptive paragraph lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.'; -const callToAction = Link one hypertext text; +const callToAction = Call-to-action link; export default { heading: 'Heading 1', From 70f636a7393d2ca9dbe264b87499cbd750893597 Mon Sep 17 00:00:00 2001 From: Meis Date: Thu, 26 Oct 2023 14:56:01 -0600 Subject: [PATCH 16/17] fix: [TextIntroduction] Use DS styles fix: Remove extraneous props for flushing tests: Update tests to use new test id --- src/components/Paragraph/Paragraphs.stories.tsx | 2 +- .../TextIntroduction/TextIntroduction.less | 17 ----------------- .../TextIntroduction.stories.tsx | 2 +- .../TextIntroduction/TextIntroduction.test.tsx | 8 -------- .../TextIntroduction/TextIntroduction.tsx | 16 +++------------- 5 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 src/components/TextIntroduction/TextIntroduction.less diff --git a/src/components/Paragraph/Paragraphs.stories.tsx b/src/components/Paragraph/Paragraphs.stories.tsx index 2a3fddb1..2810864d 100644 --- a/src/components/Paragraph/Paragraphs.stories.tsx +++ b/src/components/Paragraph/Paragraphs.stories.tsx @@ -2,7 +2,7 @@ import type { Meta } from '@storybook/react'; import { Paragraph } from './Paragraph'; const meta: Meta = { - title: 'Components (Verified)/Paragraphs', + title: 'Components (Draft)/Paragraphs', component: Paragraph }; diff --git a/src/components/TextIntroduction/TextIntroduction.less b/src/components/TextIntroduction/TextIntroduction.less deleted file mode 100644 index 15d908fc..00000000 --- a/src/components/TextIntroduction/TextIntroduction.less +++ /dev/null @@ -1,17 +0,0 @@ -// WARNING: Styles in this file are intentional overrides of the CFPB Design System - -@import (reference) "@cfpb/cfpb-design-system/src/cfpb-design-system.less"; - -.text-intro.block { - margin-top: 0px; -} - -.text-intro .lead-paragraph, -.text-intro p { - margin-bottom: 15px; - margin-top: 0; -} - -.text-intro p + ul { - margin-top: 15px; -} diff --git a/src/components/TextIntroduction/TextIntroduction.stories.tsx b/src/components/TextIntroduction/TextIntroduction.stories.tsx index af5b0fdc..1bb0896d 100644 --- a/src/components/TextIntroduction/TextIntroduction.stories.tsx +++ b/src/components/TextIntroduction/TextIntroduction.stories.tsx @@ -3,7 +3,7 @@ import { TextIntroduction } from './TextIntroduction'; import placeholders from './testHelpers'; const meta: Meta = { - title: 'Components (Verified)/Text introductions', + title: 'Components (Draft)/Text introductions', component: TextIntroduction }; diff --git a/src/components/TextIntroduction/TextIntroduction.test.tsx b/src/components/TextIntroduction/TextIntroduction.test.tsx index c4fe8399..9935743b 100644 --- a/src/components/TextIntroduction/TextIntroduction.test.tsx +++ b/src/components/TextIntroduction/TextIntroduction.test.tsx @@ -11,12 +11,4 @@ describe('', () => { expect(screen.getByText(placeholders.description)).toBeInTheDocument(); expect(screen.getByText('Call-to-action link')).toBeInTheDocument(); }); - - it('supports setting top/bottom as flush (remove margin)', () => { - render(); - const element = screen.getByTestId('text-intro-wrapper'); - expect(element).toBeInTheDocument(); - expect(element.classList.contains('block__flush-top')).toBe(true); - expect(element.classList.contains('block__flush-bottom')).toBe(true); - }); }); diff --git a/src/components/TextIntroduction/TextIntroduction.tsx b/src/components/TextIntroduction/TextIntroduction.tsx index 26544396..51e77b1b 100644 --- a/src/components/TextIntroduction/TextIntroduction.tsx +++ b/src/components/TextIntroduction/TextIntroduction.tsx @@ -4,7 +4,6 @@ import { Heading } from '../Headings/Heading'; import List from '../List/List'; import ListItem from '../List/ListItem'; import { Paragraph } from '../Paragraph/Paragraph'; -import './TextIntroduction.less'; interface TextIntroductionProperties extends React.HTMLProps { // Page title @@ -12,13 +11,9 @@ interface TextIntroductionProperties extends React.HTMLProps { // Lead paragraph subheading: string; // Descriptive paragraph - description?: ReactNode | string; + description?: ReactNode; // Call-to-action callToAction?: JSX.Element; - // Remove top margin? - isFlushTop?: boolean; - // Remove bottom margin? - isFlushBottom?: boolean; } /** @@ -32,14 +27,9 @@ export const TextIntroduction = ({ description, callToAction, className, - isFlushTop, - isFlushBottom, ...properties }: TextIntroductionProperties): JSX.Element => { - const cnames = ['block', 'text-intro', className]; - - if (isFlushTop) cnames.push('block__flush-top'); - if (isFlushBottom) cnames.push('block__flush-bottom'); + const cnames = ['o-text-introduction', className]; const call2action = callToAction && ( @@ -51,7 +41,7 @@ export const TextIntroduction = ({
{heading} {subheading} From da513ce367b7bbe7a77cdd380e2ee5f21d361307 Mon Sep 17 00:00:00 2001 From: Meis Date: Tue, 31 Oct 2023 11:21:14 -0600 Subject: [PATCH 17/17] Move Paragraph and TextIntroduction to "Verified" status --- src/components/Paragraph/Paragraphs.stories.tsx | 2 +- src/components/TextIntroduction/TextIntroduction.stories.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Paragraph/Paragraphs.stories.tsx b/src/components/Paragraph/Paragraphs.stories.tsx index 2810864d..2a3fddb1 100644 --- a/src/components/Paragraph/Paragraphs.stories.tsx +++ b/src/components/Paragraph/Paragraphs.stories.tsx @@ -2,7 +2,7 @@ import type { Meta } from '@storybook/react'; import { Paragraph } from './Paragraph'; const meta: Meta = { - title: 'Components (Draft)/Paragraphs', + title: 'Components (Verified)/Paragraphs', component: Paragraph }; diff --git a/src/components/TextIntroduction/TextIntroduction.stories.tsx b/src/components/TextIntroduction/TextIntroduction.stories.tsx index 1bb0896d..af5b0fdc 100644 --- a/src/components/TextIntroduction/TextIntroduction.stories.tsx +++ b/src/components/TextIntroduction/TextIntroduction.stories.tsx @@ -3,7 +3,7 @@ import { TextIntroduction } from './TextIntroduction'; import placeholders from './testHelpers'; const meta: Meta = { - title: 'Components (Draft)/Text introductions', + title: 'Components (Verified)/Text introductions', component: TextIntroduction };