Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove padding and use lineheight instead to vertical align text #719

Merged
merged 1 commit into from
Apr 9, 2024
Merged
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
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
Loading