Skip to content

Commit

Permalink
Merge pull request #6566 from Sage/FE-6079-splitbutton-fix
Browse files Browse the repository at this point in the history
fix(split-button): fix style when href is passed to a button
  • Loading branch information
nuria1110 authored Feb 7, 2024
2 parents 5f06ad0 + c66ef17 commit cef388a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ const StyledButtonChildrenContainer = styled.div<StyledButtonChildrenContainerPr
text-align: ${align};
z-index: ${theme.zIndex.overlay};
/* Styling for Safari. */
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
display: -webkit-box;
justify-content: ${align === "right" ? `flex-end` : `flex-start`};
}
}
& + & {
margin-top: 3px;
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/split-button/split-button-children.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const StyledSplitButtonChildrenContainer = styled.div<StyledSplitButtonChildrenC
${StyledButton} {
border: 1px solid var(--colorsActionMajorTransparent);
display: block;
display: flex;
justify-content: ${align};
margin-left: 0;
min-width: 100%;
text-align: ${align};
Expand Down
2 changes: 1 addition & 1 deletion src/components/split-button/split-button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Accordion } from "../accordion";

export const Default: ComponentStory<typeof SplitButton> = () => (
<SplitButton text="Split button">
<Button>Button 1</Button>
<Button href="#">Button 1</Button>
<Button>Button 2</Button>
<Button>Button 3</Button>
</SplitButton>
Expand Down

0 comments on commit cef388a

Please sign in to comment.