From 1e84c7d7af37427362d9284341a448adf5758bcb Mon Sep 17 00:00:00 2001 From: Niels Godfredsen Date: Tue, 22 Oct 2024 17:21:21 -0700 Subject: [PATCH] remove pre and pre-wrap options --- .../src/Typography/Typography.module.css | 8 ------- .../src/Typography/Typography.stories.tsx | 22 +------------------ .../syntax-core/src/Typography/Typography.tsx | 8 +------ 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/packages/syntax-core/src/Typography/Typography.module.css b/packages/syntax-core/src/Typography/Typography.module.css index aeb8f460..3ced1802 100644 --- a/packages/syntax-core/src/Typography/Typography.module.css +++ b/packages/syntax-core/src/Typography/Typography.module.css @@ -226,14 +226,6 @@ white-space: nowrap; } -.pre { - white-space: pre; -} - .preLine { white-space: pre-line; } - -.preWrap { - white-space: pre-wrap; -} diff --git a/packages/syntax-core/src/Typography/Typography.stories.tsx b/packages/syntax-core/src/Typography/Typography.stories.tsx index 75fee8fa..7da6f148 100644 --- a/packages/syntax-core/src/Typography/Typography.stories.tsx +++ b/packages/syntax-core/src/Typography/Typography.stories.tsx @@ -80,7 +80,7 @@ export default { control: { type: "radio" }, }, whiteSpace: { - options: ["inherit", "normal", "nowrap", "pre", "preLine", "preWrap"], + options: ["inherit", "normal", "nowrap", "preLine"], control: { type: "radio" }, }, }, @@ -267,16 +267,6 @@ export const WhiteSpaceNowrap: StoryObj = { ), }; -export const WhiteSpacePre: StoryObj = { - render: (args) => ( - <> - - {WHITE_SPACE_SAMPLE} - - - ), -}; - export const WhiteSpacePreLine: StoryObj = { render: (args) => ( <> @@ -286,13 +276,3 @@ export const WhiteSpacePreLine: StoryObj = { ), }; - -export const WhiteSpacePreWrap: StoryObj = { - render: (args) => ( - <> - - {WHITE_SPACE_SAMPLE} - - - ), -}; diff --git a/packages/syntax-core/src/Typography/Typography.tsx b/packages/syntax-core/src/Typography/Typography.tsx index 768ce8e6..8ea97dc9 100644 --- a/packages/syntax-core/src/Typography/Typography.tsx +++ b/packages/syntax-core/src/Typography/Typography.tsx @@ -134,13 +134,7 @@ const Typography = forwardRef< * * @defaultValue "inherit" */ - whiteSpace?: - | "inherit" - | "normal" - | "nowrap" - | "pre" - | "preLine" - | "preWrap"; + whiteSpace?: "inherit" | "normal" | "nowrap" | "preLine"; } >(function Typography( {