From 92e53a088112d41a1fe96f091350f36d0caaa97c Mon Sep 17 00:00:00 2001 From: u4aew Date: Wed, 18 Dec 2024 19:47:43 +0300 Subject: [PATCH] feat(Progress): change prop text (#1993) Co-authored-by: Angelina Gadzhieva --- src/components/Progress/ProgressInnerText.tsx | 2 +- src/components/Progress/README.md | 2 +- src/components/Progress/types.ts | 2 +- 3 files changed, 3 insertions(+), 3 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/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` | | 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. */