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

[core] fix(Section): Section header should only render if title is provided #6321

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

pgoldberg
Copy link
Contributor

@pgoldberg pgoldberg commented Aug 17, 2023

Fixes #6324

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Hide the header if there's no passed in title prop

Reviewers should focus on:

Maybe we should have a separate prop for this? It seems a bit strange that we'd just ignore subtitle and rightElement if there's no title...

Screenshot

image

@adidahiya
Copy link
Contributor

remove now-unnecessary title null checks

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya
Copy link
Contributor

prettier

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Copy link
Contributor

@gluxon gluxon left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -74,6 +74,7 @@ export interface SectionProps extends Props, Omit<HTMLDivProps, "title">, React.

/**
* Element to render on the right side of the section header.
* Note that the header will only be rendered if `title` is provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch copying this comment over from the other props that are no-ops if title is not provided.

@pgoldberg pgoldberg merged commit f1f1cee into develop Aug 18, 2023
@pgoldberg pgoldberg deleted the pgoldberg/fixSectionHeader branch August 18, 2023 17:08
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.

Section shows header even if title isn't provided
3 participants