Skip to content

Commit

Permalink
fix(steps): make checkIsStepCustom's return value nullable (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
annette-st authored Jul 18, 2023
1 parent f98fd23 commit a464a29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-carrots-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alfalab/core-components-steps": minor
---

fix(steps): make checkIsStepCustom's return value nullable
4 changes: 2 additions & 2 deletions packages/steps/src/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ export type StepsProps = {
/**
* Кастомный метод для установки кастомного индикатора шага
* @param stepNumber - номер шага
* @return Объект StepIndicatorProps { className, content, iconColor }
* @return Объект StepIndicatorProps { className, content, iconColor } или null
*/
checkIsStepCustom?: (stepNumber: number) => StepIndicatorProps;
checkIsStepCustom?: (stepNumber: number) => StepIndicatorProps | null;

/**
* Обработчик клика на шаг
Expand Down
2 changes: 1 addition & 1 deletion packages/steps/src/components/step/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export type StepProps = {
/**
* Свойства кастомного индикатора текущего шага
*/
customStepIndicator?: StepIndicatorProps;
customStepIndicator?: StepIndicatorProps | null;

/**
* Управление ориентацией компонента
Expand Down

0 comments on commit a464a29

Please sign in to comment.