Skip to content

Commit 987dc1c

Browse files
author
Kubit
committed
Add new maxTruncated prop to stepperNumber
1 parent 168bdd4 commit 987dc1c

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/components/stepperNumber/stepperNumberStandAlone.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const StepperNumberStandAloneComponent = (
113113
<Text
114114
component={TextComponentType.SPAN}
115115
customTypography={props.styles?.[step.state]?.stepName}
116+
maxTruncatedLines={props.stepMaxTruncatedLines}
116117
>
117118
{step.name}
118119
</Text>

src/components/stepperNumber/stories/argtypes.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ export const argtypes = (variants: IThemeObjectVariants, themeSelected: string):
7272
category: CATEGORY_CONTROL.CONTENT,
7373
},
7474
},
75+
stepMaxTruncatedLines: {
76+
description: 'Indicates the maximum lines for the step name',
77+
control: { type: 'number' },
78+
type: { name: 'number' },
79+
table: {
80+
type: {
81+
summary: 'number',
82+
},
83+
category: CATEGORY_CONTROL.MODIFIERS,
84+
},
85+
},
7586
currentStep: {
7687
description: 'Father current step',
7788
control: { type: 'number' },

src/components/stepperNumber/types/stepperNumber.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface IStepperNumberStandAlone {
2525
horizontalOrientationWidth?: string;
2626
completedStepIcon?: IElementOrIcon;
2727
steps?: string[];
28+
stepMaxTruncatedLines?: number;
2829
currentStep?: number;
2930
['aria-label']?: string;
3031
/**

0 commit comments

Comments
 (0)