Skip to content

Commit

Permalink
refactor(steps): components to be list and aria-hide icons
Browse files Browse the repository at this point in the history
  • Loading branch information
iacopolea committed Jan 17, 2024
1 parent 5aa2eb6 commit 944438d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
18 changes: 15 additions & 3 deletions src/stories/Steps/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export const Step = ({
<div className="step-status">
<TransitionGroup className="step-status-icon">
{status === "current" && (
<CSSTransition classNames="status-icon" timeout={animationTimeout}>
<CSSTransition
aria-hidden="true"
classNames="status-icon"
timeout={animationTimeout}
>
{direction === "vertical" ? (
<ArrowRightCircle />
) : (
Expand All @@ -65,12 +69,20 @@ export const Step = ({
</CSSTransition>
)}
{status === "completed" && (
<CSSTransition classNames="status-icon" timeout={animationTimeout}>
<CSSTransition
aria-hidden="true"
classNames="status-icon"
timeout={animationTimeout}
>
<CheckCircleFill />
</CSSTransition>
)}
{status === "inactive" && (
<CSSTransition classNames="status-icon" timeout={animationTimeout}>
<CSSTransition
aria-hidden="true"
classNames="status-icon"
timeout={animationTimeout}
>
<Circle />
</CSSTransition>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Steps/Steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Steps = ({
});
return (
<StyledSteps className={className} direction={direction} {...props}>
<div className="steps">{items}</div>
<ul className="steps">{items}</ul>
</StyledSteps>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Steps/StyledStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const verticalProgressBar = css`
}
`;

export const StyledStep = styled.div<{
export const StyledStep = styled.li<{
status: StepProps["status"];
direction: StepProps["direction"];
clickable: boolean;
Expand Down

0 comments on commit 944438d

Please sign in to comment.