Skip to content

Commit

Permalink
feat(tabstepper): styles
Browse files Browse the repository at this point in the history
  • Loading branch information
kostasdano committed Oct 17, 2024
1 parent fb82893 commit ad3a9a3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
4 changes: 4 additions & 0 deletions src/components/TabStepper/components/TabStep/TabStep.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { flex, flexCenterVertical } from '~/theme/functions';
export const stepStyles = () =>
css`
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
`;

export const stepContainer = () => (theme: Theme) =>
Expand All @@ -20,6 +23,7 @@ export const stepTitle = () => (theme: Theme) =>
css`
${flexCenterVertical};
justify-content: space-between;
gap: ${theme.globals.spacing.get('7')};
${theme.tokens.typography.get('normal.title02')}
`;
Expand Down
38 changes: 21 additions & 17 deletions src/components/TabStepper/components/TabStep/TabStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,27 @@ const TabStep = React.forwardRef<HTMLDivElement, TabStepProps>((props, ref) => {
<ReactAriaTab id={id} {...rest} ref={ref} css={stepStyles()} data-status={status}>
{children ?? (
<div css={stepContainer()}>
<div css={stepTitle()} data-role="title" data-testid={`${dataTestPrefixId}_title`}>
{title}
{hasIcon && (
<Icon
name={iconName}
color={theme.tokens.colors.get(iconColor)}
dataTestPrefixId={`${dataTestPrefixId}_icon`}
/>
)}
</div>
<div
css={stepSubtitle()}
data-role="subtitle"
data-testid={`${dataTestPrefixId}_subtitle`}
>
{subtitle}
</div>
{title && (
<div css={stepTitle()} data-role="title" data-testid={`${dataTestPrefixId}_title`}>
{title}
{hasIcon && (
<Icon
name={iconName}
color={theme.tokens.colors.get(iconColor)}
dataTestPrefixId={`${dataTestPrefixId}_icon`}
/>
)}
</div>
)}
{subtitle && (
<div
css={stepSubtitle()}
data-role="subtitle"
data-testid={`${dataTestPrefixId}_subtitle`}
>
{subtitle}
</div>
)}
</div>
)}
</ReactAriaTab>
Expand Down

0 comments on commit ad3a9a3

Please sign in to comment.