Skip to content

Commit

Permalink
fix(ButtonPrimitive): add missing flex-auto
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Jan 5, 2024
1 parent f392cde commit 70dcfcd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 17 additions & 0 deletions packages/orbit-components/src/Button/Button.stories.tsx
Expand Up @@ -51,6 +51,23 @@ BasicButtons.story = {
},
};

export const MultipleFullWidthButtonsInContainer = () => {
return (
<div style={{ width: 300, backgroundColor: "lightgray" }}>
Your privacy, your choice
<Stack direction="row">
<Button type="secondary" fullWidth>
Customize
</Button>
<Button type="secondary" fullWidth>
Reject all
</Button>
<Button fullWidth>Accept</Button>
</Stack>
</div>
);
};

export const ButtonWithIcons = () => {
const children = text("Children", "Button");
const fullWidth = boolean("fullWidth", false);
Expand Down
Expand Up @@ -162,8 +162,7 @@ const ButtonPrimitive = React.forwardRef<HTMLButtonElement | HTMLAnchorElement,
className={cx(
className,
"orbit-button-primitive font-base duration-fast group relative max-w-full items-center justify-center border-none text-center leading-none transition-all [&>*]:align-middle [&_.orbit-loading-spinner]:stroke-[currentColor]",
"flex-none",
fullWidth && "w-full",
fullWidth ? "w-full flex-auto" : "flex-none",
circled !== true && "rounded-large tb:rounded-normal",
isDisabled
? "cursor-not-allowed opacity-30"
Expand Down

0 comments on commit 70dcfcd

Please sign in to comment.