Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/Stepper/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface StepProps extends Omit<
warning?: boolean;
active?: boolean;
completed?: boolean;
redo?: boolean;
link?: string;
index?: number;
hideLine?: boolean;
Expand All @@ -30,6 +31,7 @@ export const Step: FC<StepProps> = ({
disabled: propDisabled,
completed: propCompleted,
active: propActive,
redo,
hideLine,
onClick,
children,
Expand Down Expand Up @@ -67,6 +69,7 @@ export const Step: FC<StepProps> = ({
data-active={active}
$active={active}
data-disabled={propDisabled}
data-redo={redo}
$stepWidth={stepWidth}
$stepsAmount={stepsAmount}
$mobile={mobile}
Expand All @@ -77,7 +80,7 @@ export const Step: FC<StepProps> = ({
<StepContentWrapper tabIndex={-1}>
<StepTrack aria-hidden>
<StepIcon as={icon} width={20} height={20} />
{!hideLine && <StepRail />}
{!hideLine && <StepRail $redo={redo} />}
</StepTrack>
{children}
</StepContentWrapper>
Expand Down
16 changes: 16 additions & 0 deletions src/components/Stepper/Stepper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ describe('Stepper', () => {
</Stepper>
</ThemeProvider>
);

it('should render component with redo step', () => {
const wrapper = render(
<ThemeProvider theme={LIGHT_THEME}>
<Stepper activeStep={0}>
<Step key={0} redo>
<StepContent>Шаг Redo (повторное редактирование)</StepContent>
</Step>
<Step key={1} completed>
<StepContent>Первый шаг</StepContent>
</Step>
</Stepper>
</ThemeProvider>,
);
expect(wrapper).toMatchSnapshot();
});
it('should render default component', () => {
const wrapper = render(<Comp />);
expect(wrapper).toMatchSnapshot();
Expand Down
Loading
Loading