Skip to content
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 <PrevNextButton> default style #9290

Merged
merged 2 commits into from Sep 19, 2023
Merged

Fix <PrevNextButton> default style #9290

merged 2 commits into from Sep 19, 2023

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Sep 18, 2023

Problems

  • <PrevNextButton> takes the entire line by default. It should be inline instead of block
  • <PrevNextButton> doesn't use the base Typography
  • <PrevNextButton> adds useless markup

Solution

Use <Stack> with custom styling

The change of inner class name is technically a breaking change, but I suggest to accept it because the feature is very recent and wasn't properly styled before.

Before

Capture d’écran 2023-09-19 à 00 12 50

After

Capture d’écran 2023-09-19 à 00 12 27 1

@fzaninotto fzaninotto added the RFR Ready For Review label Sep 18, 2023
@@ -108,7 +115,7 @@ export const PrevNextButtons = <RecordType extends RaRecord = any>(

if (isLoading) {
return (
<Box minHeight={theme => theme.spacing(4)}>
Copy link
Member Author

Choose a reason for hiding this comment

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

I can't keep consistent height between the empty / loading / loaded versions unless I switch to pixels

@fzaninotto fzaninotto changed the title Fix <PrevNextButton> styling Fix <PrevNextButton> default style Sep 18, 2023
@djhi djhi merged commit b8611d8 into master Sep 19, 2023
11 checks passed
@djhi djhi deleted the fix-prevnextbutton branch September 19, 2023 07:18
@djhi djhi added this to the 4.14.2 milestone Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants