Skip to content

Commit

Permalink
remove padding from SteapHeader and use lineheight instead to vertica…
Browse files Browse the repository at this point in the history
…l align text and icon in Circle

remove padding right from StepContent to keep Button align with StepHeader
  • Loading branch information
JeanMarcMilletScality committed Apr 9, 2024
1 parent 136c3e9 commit 92217ce
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/lib/components/steppers/Steppers.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const Circle = styled.div<{
display: flex;
justify-content: center;
align-items: center;
line-height: 30px;
width: 30px;
height: 30px;
border-radius: 50%;
Expand Down Expand Up @@ -74,14 +75,15 @@ const Circle = styled.div<{
}};
`;
const StepHeader = styled.span<{ active?: boolean }>`
padding: 8px;
margin-left: ${spacing.r8};
line-height: 30px;
color: ${(props) =>
props.active
? getThemePropSelector('textPrimary')
: getThemePropSelector('textSecondary')};
`;
const StepContent = styled.div`
padding: ${spacing.r8};
padding: ${spacing.r8} 0 ${spacing.r8} ${spacing.r8};
`;
const BottomBar = styled.hr<{ completed?: boolean }>`
flex-grow: 1;
Expand Down Expand Up @@ -128,7 +130,15 @@ function Step(props: StepProps) {
{!isLast && <BottomBar completed={completed} />}
</Panel>
<Panel>
<StepHeader active={active}>{title}</StepHeader>
<div
style={{
height: '30px',
display: 'flex',
alignItems: 'center',
}}
>
<StepHeader active={active}>{title}</StepHeader>
</div>
{active && <StepContent>{content}</StepContent>}
</Panel>
</StepContainer>
Expand Down

0 comments on commit 92217ce

Please sign in to comment.