Skip to content

fix: allow disabled prop to pass through to button element#1243

Open
georgewrmarshall wants to merge 2 commits into
mainfrom
fix/text-button-disabled-prop
Open

fix: allow disabled prop to pass through to button element#1243
georgewrmarshall wants to merge 2 commits into
mainfrom
fix/text-button-disabled-prop

Conversation

@georgewrmarshall

Copy link
Copy Markdown
Contributor

Description

Removes disabled from the Omit in TextButtonProps so consumers can pass the native disabled attribute down to the underlying <button> element. Also renames the destructured catch-all from ...rest to ...props per monorepo conventions.

Related issues

Fixes:

Manual testing steps

  1. Render a TextButton with disabled prop and verify the button is disabled.
  2. Confirm disabled styling and non-interactivity behave as expected.

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I've included tests if applicable
  • I've documented my code using JSDoc format if applicable
  • I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@georgewrmarshall georgewrmarshall requested a review from a team as a code owner June 17, 2026 10:35
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@georgewrmarshall georgewrmarshall changed the title fix(TextButton): allow disabled prop to pass through to button element fix: allow disabled prop to pass through to button element Jun 17, 2026
@georgewrmarshall georgewrmarshall enabled auto-merge (squash) June 17, 2026 11:46
ComponentProps<'button'>,
'children' | 'color' | 'disabled' | 'onClick'
> & {
Omit<ComponentProps<'button'>, 'children' | 'color' | 'onClick'> & {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove disabled from omit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant