-
Notifications
You must be signed in to change notification settings - Fork 72
feat(ActionButton): use button component for action button #1358
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ import type { | |
| ElementType, | ||
| MouseEventHandler, | ||
| ReactNode, | ||
| Ref, | ||
| } from "react"; | ||
|
|
||
| import type { ClassName, ValueOf } from "types"; | ||
|
|
@@ -64,6 +65,10 @@ export type Props<P = null> = { | |
| * Whether the button should be small. | ||
| */ | ||
| small?: boolean; | ||
| /** | ||
| * A ref to the button. | ||
| */ | ||
| ref?: Ref<HTMLButtonElement>; | ||
| } & (Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick"> | P); | ||
|
Comment on lines
+68
to
72
|
||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,8 +4,9 @@ | |||||
|
|
||||||
| import ConfirmationModal from "./ConfirmationModal"; | ||||||
| import Input from "../Input"; | ||||||
| import Icon from "components/Icon"; | ||||||
|
|
||||||
| const doNothing = () => {}; | ||||||
| const doNothing = () => { }; | ||||||
|
||||||
| const doNothing = () => { }; | |
| const doNothing = () => {}; |
Check failure on line 34 in src/components/ConfirmationModal/ConfirmationModal.stories.tsx
GitHub Actions / Lint, build and test
Replace `<><Icon·name="delete"·light·/><span>Delete</span></>` with `⏎··············<>⏎················<Icon·name="delete"·light·/>⏎················<span>Delete</span>⏎··············</>⏎············`
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.
Now that
ActionButtonrenders<Button>, theappearance ? \p-button--${appearance}` : "p-button"class inbuttonClassescombines withButton’s own defaultp-buttonclass (sinceappearanceisn’t passed through), changing the rendered class list vs before (e.g.p-button p-button--negative). Passappearance={appearance}toButtonand remove thep-button...portion frombuttonClassesto keep styling consistent with theButton` component.