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

feat(Flyout): Add as prop for Flyout title #2925

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/gamut/src/Flyout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface FlyoutProps extends WithChildrenProp {
openFrom?: 'left' | 'right';

/**
* Contents for a top-left h2.
* Contents for a top-left h1.
*/
title: React.ReactNode;
bg?: Colors;
Expand Down Expand Up @@ -72,7 +72,7 @@ export const Flyout: React.FC<FlyoutProps> = ({
maxWidth="100%"
justifyContent="space-between"
>
<Text as="h2" fontSize={22}>
<Text as="h1" fontSize={22}>
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think it makes sense for this to be configurable and default to h1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm i had that initially but i couldn't think of a case when title wont be the first in the heading level

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah that makes sense - we can swap to h1 and just refactor if there are any cases of it needing another title level

{title}
</Text>
<IconButton
Expand Down
Loading