Skip to content

Rename button component props - #335

Open
devmount wants to merge 6 commits into
mainfrom
enhancements/171-restructure-button-component
Open

devmount wants to merge 6 commits into
mainfrom
enhancements/171-restructure-button-component

Conversation

@devmount

@devmount devmount commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

What changed?

Warning

This is a breaking change.

Renamed BaseButton props to remove the naming clash with the native HTML button type attribute and make naming more intuitive:

  • type (visual style) is renamed to variant
  • variant (filled/outline) becomes a boolean outline prop
  • formAction (the native button type) is now exposed as type (button/submit/reset)

Updated the button wrapper components, Storybook stories, README.md examples and BaseButton.test.js accordingly.

Why?

Fixes the confusion raised in review of #168, where a custom formAction prop was added because the existing type prop already meant "visual style" instead of the native button type.

Limitations and Notes

Breaking change, see the migration guide below.

How to migrate

  • Rename type (style) to variant
  • Remove variant="filled" (it's the default)
  • Replace variant="outline" with the boolean outline prop
  • Replace form-action="submit|reset|none" with type="submit|reset|button"
- <base-button type="primary" variant="outline" form-action="submit">
+ <base-button variant="primary" outline type="submit">
    Submit
  </base-button>

Applicable Issues

Closes #171

QA Log

  • pnpm run test:components: 530/530 tests passing
  • pnpm run type-check: no errors
  • pnpm storybook and manually checked the stories if everything renders correctly

Screenshots

No visual/CSS changes, only prop renames

@devmount devmount added the BREAKING This issue or PR contains a breaking change which requires a new major release. label Sep 25, 2026
@devmount devmount self-assigned this Sep 25, 2026

This branch has not been deployed

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

Labels

BREAKING This issue or PR contains a breaking change which requires a new major release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor button properties

1 participant