Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(text): add whiteSpace support #1037

Merged

Conversation

armasson
Copy link
Contributor

@armasson armasson commented Dec 20, 2023

General summary

Proposition to update the design-system Text component, and add a new whiteSpace property, to customise the Text CSS style.

This will let the user choose the CSS white-space property he want for the text. The use case that motivated this PR was to show the Text string, with it's formatting intact (line break, spaces, ...) using white-space: pre-wrap.

Screenshots

Screenshot 2023-12-20 at 14 53 39

StoryBook: https://50cad0c2--5fbfb1d508c0520021560f10.chromatic.com/ (Chromatic build) ⚠️ Outdated commit

@armasson armasson marked this pull request as ready for review December 20, 2023 15:23
@armasson armasson requested review from lumautomation, matmkian and a team as code owners December 20, 2023 15:23
@armasson armasson force-pushed the feat/add-white-space-customisation-for-text-component branch from 4d51744 to 3768d66 Compare December 22, 2023 10:02
@gcornut gcornut force-pushed the feat/add-white-space-customisation-for-text-component branch from 3768d66 to f82a9bc Compare January 4, 2024 09:31
Copy link
Member

@gcornut gcornut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/lumx-core/src/scss/components/text/_index.scss Outdated Show resolved Hide resolved
packages/lumx-core/src/scss/components/text/_index.scss Outdated Show resolved Hide resolved
@armasson armasson force-pushed the feat/add-white-space-customisation-for-text-component branch 2 times, most recently from 37a1637 to 50cad0c Compare January 4, 2024 14:32
@armasson armasson force-pushed the feat/add-white-space-customisation-for-text-component branch from 50cad0c to a6150e7 Compare January 4, 2024 14:51
@gcornut
Copy link
Member

gcornut commented Jan 5, 2024

Test OK on storybook and in automated visual test ✔️

@gcornut gcornut merged commit 87ebe1c into master Jan 5, 2024
7 checks passed
@gcornut gcornut deleted the feat/add-white-space-customisation-for-text-component branch January 5, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants