From c8f6c674913bd46f888a972ec33b76a7824526a9 Mon Sep 17 00:00:00 2001 From: Sergey Uchaev Date: Sat, 14 Dec 2024 14:51:05 +0300 Subject: [PATCH 1/2] feat: change type text props in component Progress --- src/components/Progress/ProgressInnerText.tsx | 2 +- src/components/Progress/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Progress/ProgressInnerText.tsx b/src/components/Progress/ProgressInnerText.tsx index 9a34df4d96..726e8c1d5f 100644 --- a/src/components/Progress/ProgressInnerText.tsx +++ b/src/components/Progress/ProgressInnerText.tsx @@ -3,7 +3,7 @@ import React from 'react'; import {progressBlock} from './constants'; export interface ProgressInnerTextProps { - text?: string; + text?: React.ReactNode; offset?: number; } diff --git a/src/components/Progress/types.ts b/src/components/Progress/types.ts index faa4cde9d0..1c1238224c 100644 --- a/src/components/Progress/types.ts +++ b/src/components/Progress/types.ts @@ -28,7 +28,7 @@ interface ProgressGeneralProps extends QAProps { export interface ProgressDefaultProps { /** Text inside progress bar */ - text: string; + text: React.ReactNode; /** Theme */ theme: ProgressTheme; /** Size. Text of progress bar is displayed in `m` size only. */ From a982368cd3c47b53f85dec7d1bb6475f15feed64 Mon Sep 17 00:00:00 2001 From: Sergey Uchaev Date: Wed, 18 Dec 2024 17:29:41 +0300 Subject: [PATCH 2/2] feat: change type text props in component Progress --- src/components/Progress/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Progress/README.md b/src/components/Progress/README.md index 7eac4d0319..52e5b01ed8 100644 --- a/src/components/Progress/README.md +++ b/src/components/Progress/README.md @@ -241,7 +241,7 @@ LANDING_BLOCK--> | size | Sets the progress bar size. The progress bar text can only be displayed in `"m"` size. | `string` | `"m"` | | stack | Configuration of composite progress bar. Not required if a `value` is provided. | `Array` | | | stackClassName | HTML `class` attribute of stack | `string` | | -| text | Text inside the progress bar | `string` | | +| text | Text inside the progress bar | `ReactNode` | | | theme | Sets progress color | `string` | `"default"` | | value | Current progress value. The available range is from 0 to 100. Using the `stack` property value is optional and is used as maxValue. | `number` | |