From b40cf332a2fd063b060d94acc9dd4e6f514b66a2 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Fri, 30 Jan 2026 18:15:19 +0000 Subject: [PATCH] Add new info to Text Signed-off-by: Charles de Dreuille --- docs-ui/src/app/components/text/components.tsx | 1 + docs-ui/src/app/components/text/snippets.ts | 1 + packages/ui/src/components/Link/definition.ts | 9 ++++++++- packages/ui/src/components/Text/Text.module.css | 4 ++++ packages/ui/src/components/Text/Text.stories.tsx | 1 + packages/ui/src/components/Text/definition.ts | 9 ++++++++- 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs-ui/src/app/components/text/components.tsx b/docs-ui/src/app/components/text/components.tsx index ef803ea2fb..8021a1dde6 100644 --- a/docs-ui/src/app/components/text/components.tsx +++ b/docs-ui/src/app/components/text/components.tsx @@ -30,6 +30,7 @@ export const Colors = () => { Danger Warning Success + Info ); }; diff --git a/docs-ui/src/app/components/text/snippets.ts b/docs-ui/src/app/components/text/snippets.ts index 7f2c222186..b8cc26bd6b 100644 --- a/docs-ui/src/app/components/text/snippets.ts +++ b/docs-ui/src/app/components/text/snippets.ts @@ -21,6 +21,7 @@ export const colorsSnippet = ` Danger Warning Success + Info `; export const weightsSnippet = ` diff --git a/packages/ui/src/components/Link/definition.ts b/packages/ui/src/components/Link/definition.ts index c52d8a336c..58b780c812 100644 --- a/packages/ui/src/components/Link/definition.ts +++ b/packages/ui/src/components/Link/definition.ts @@ -27,7 +27,14 @@ export const LinkDefinition = { dataAttributes: { variant: ['subtitle', 'body', 'caption', 'label'] as const, weight: ['regular', 'bold'] as const, - color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const, + color: [ + 'primary', + 'secondary', + 'danger', + 'warning', + 'success', + 'info', + ] as const, truncate: [true, false] as const, standalone: [true, false] as const, }, diff --git a/packages/ui/src/components/Text/Text.module.css b/packages/ui/src/components/Text/Text.module.css index 57de6f0ef8..b7b7b9f203 100644 --- a/packages/ui/src/components/Text/Text.module.css +++ b/packages/ui/src/components/Text/Text.module.css @@ -91,6 +91,10 @@ color: var(--bui-fg-success); } + .bui-Text[data-color='info'] { + color: var(--bui-fg-info); + } + .bui-Text[data-truncate] { overflow: hidden; text-overflow: ellipsis; diff --git a/packages/ui/src/components/Text/Text.stories.tsx b/packages/ui/src/components/Text/Text.stories.tsx index 09a317716a..e8dff19318 100644 --- a/packages/ui/src/components/Text/Text.stories.tsx +++ b/packages/ui/src/components/Text/Text.stories.tsx @@ -101,6 +101,7 @@ export const AllColors = meta.story({ + ), }); diff --git a/packages/ui/src/components/Text/definition.ts b/packages/ui/src/components/Text/definition.ts index dbbfd6b72a..ad676405c7 100644 --- a/packages/ui/src/components/Text/definition.ts +++ b/packages/ui/src/components/Text/definition.ts @@ -27,7 +27,14 @@ export const TextDefinition = { dataAttributes: { variant: ['subtitle', 'body', 'caption', 'label'] as const, weight: ['regular', 'bold'] as const, - color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const, + color: [ + 'primary', + 'secondary', + 'danger', + 'warning', + 'success', + 'info', + ] as const, truncate: [true, false] as const, }, } as const satisfies ComponentDefinition;