Skip to content

Commit

Permalink
fix link alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Jun 14, 2024
1 parent e4c03a0 commit aee09cc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/__stories__/button-layout-story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const Template: React.FC<Props> = ({align = 'full-width'}) => (
primaryButton={<ButtonPrimary onPress={() => {}}>Ok</ButtonPrimary>}
secondaryButton={<ButtonSecondary onPress={() => {}}>Cancel</ButtonSecondary>}
/>

<Title1 as="h2">Only link</Title1>
<ButtonLayout align={align} link={<ButtonLink href="#">Text link</ButtonLink>} />
</Stack>
</StorySection>
);
Expand Down
2 changes: 1 addition & 1 deletion src/button-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ButtonLayout: React.FC<ButtonLayoutProps> = ({

const linkContainer = link ? (
<div
className={classnames(numberOfButtons > 1 ? styles.linkWithTwoButtons : styles.link)}
className={classnames(numberOfButtons !== 1 ? styles.linkWithTwoButtons : styles.link)}
data-link="true"
>
{link}
Expand Down

0 comments on commit aee09cc

Please sign in to comment.