-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix(ButtonTwoLines): split rendering of button or link #14521
Merged
pettinarip
merged 4 commits into
ethereum:dev
from
TylerAPfledderer:fix/ButtonTwoLines-split-renders
Dec 23, 2024
+159
−175
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
205e087
fix(ButtonTwoLines): split renders of button and link
TylerAPfledderer 6c09074
chore: remove old version of ButtonTwoLines
TylerAPfledderer 70ea4cb
fix(BugBountyCards): update typing of `href` prop for submit button
TylerAPfledderer 81da546
fix(ButtonTwoLines): send `size` to `createSplitProps`
TylerAPfledderer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export { default as Button, type ButtonProps, checkIsSecondary } from "./Button" | ||
export { default as ButtonLink, type ButtonLinkProps } from "./ButtonLink" | ||
export { default as ButtonTwoLines } from "./ButtonTwoLines" | ||
export { default as IconButton } from "./IconButton" |
35 changes: 35 additions & 0 deletions
35
src/components/ui/__stories__/ButtonLinkTwoLines.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { BiCircle } from "react-icons/bi" | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
|
||
import { ButtonLinkTwoLines as ButtonLinkTwoLinesComponent } from "../buttons/ButtonTwoLines" | ||
import { Stack } from "../flex" | ||
|
||
const meta = { | ||
title: "Atoms / Form / Buttons / ButtonTwoLines", | ||
component: ButtonLinkTwoLinesComponent, | ||
} satisfies Meta<typeof ButtonLinkTwoLinesComponent> | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof meta> | ||
|
||
export const ButtonLinkTwoLines: Story = { | ||
args: { | ||
icon: BiCircle, | ||
mainText: "Main Text", | ||
helperText: "Helper Text", | ||
className: "w-[300px]", | ||
href: "#", | ||
}, | ||
render: (args) => ( | ||
<Stack className="gap-8"> | ||
<ButtonLinkTwoLinesComponent {...args} /> | ||
<ButtonLinkTwoLinesComponent | ||
{...args} | ||
iconAlignment="end" | ||
size="sm" | ||
reverseTextOrder | ||
/> | ||
</Stack> | ||
), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious, is the intention of this change to make the field required? looks good if so