Skip to content

feat: Allow to disable the responsive shrink of Buttons - #11324

Open
mjsarfatti wants to merge 1 commit into
marmelab:nextfrom
mjsarfatti:react-admin-8720-feat
Open

feat: Allow to disable the responsive shrink of Buttons#11324
mjsarfatti wants to merge 1 commit into
marmelab:nextfrom
mjsarfatti:react-admin-8720-feat

Conversation

@mjsarfatti

Copy link
Copy Markdown
Contributor

Closes #8720

Problem

Action buttons always collapse to an icon button below the sm breakpoint (and to a FAB below md), with no way to opt out short of reimplementing the buttons.

Solution

Add a breakpoint prop to control the threshold, or disable the behavior entirely with breakpoint={false}. Defaults preserve the current behavior, and the prop is themable via RaButton.defaultProps so it can be turned off application-wide.

How To Test

See "Button > Breakpoint" and "CreateButton > Breakpoint" stories.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

Action buttons always collapse to an icon button below the `sm` breakpoint
(and <CreateButton> to a FAB below `md`), with no way to opt out short of
reimplementing the buttons. Add a `breakpoint` prop to control the threshold,
or disable the behavior entirely with `breakpoint={false}`. Defaults preserve
the current behavior, and the prop is themable via `RaButton.defaultProps` so
it can be turned off application-wide.

Closes marmelab#8720
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