-
Notifications
You must be signed in to change notification settings - Fork 5k
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
chore: updating header to use heading sm #29308
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,11 +61,7 @@ const ConnectedAccountsPermissions = ({ permissions }) => { | |
padding={0} | ||
backgroundColor={BackgroundColor.backgroundDefault} | ||
> | ||
<Text | ||
onClick={toggleExpanded} | ||
as="h6" | ||
variant={TextVariant.bodyMdMedium} | ||
> | ||
<Text onClick={toggleExpanded} variant={TextVariant.bodyMdMedium}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removes incorrect h6 tag |
||
{t('permissions')} | ||
</Text> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,17 +54,20 @@ export const Header = ({ | |
endAccessory={endAccessory} | ||
{...props} | ||
> | ||
<Text | ||
display={Display.Block} | ||
variant={TextVariant.bodyMdBold} | ||
textAlign={TextAlign.Center} | ||
paddingInlineStart={8} | ||
paddingInlineEnd={8} | ||
ellipsis | ||
{...textProps} | ||
> | ||
{children} | ||
</Text> | ||
{children && ( | ||
<Text | ||
as="h2" | ||
display={Display.Block} | ||
variant={TextVariant.headingSm} | ||
textAlign={TextAlign.Center} | ||
paddingInlineStart={8} | ||
paddingInlineEnd={8} | ||
ellipsis | ||
{...textProps} | ||
> | ||
{children} | ||
</Text> | ||
)} | ||
Comment on lines
+57
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding logic to only render the h2 tag if children exist see ui/components/app/assets/nfts/nft-details/snapshots/nft-full-image.test.js.snap |
||
</HeaderBase> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,15 +29,11 @@ exports[`All Connections render renders correctly 1`] = ` | |
<div | ||
class="mm-box" | ||
> | ||
<p | ||
class="mm-box mm-text mm-text--body-md-bold mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
<h2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating to use heading sm and more correct semantic html |
||
class="mm-box mm-text mm-text--heading-sm mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
> | ||
<span | ||
class="mm-box mm-text mm-text--heading-md mm-text--text-align-center mm-box--color-text-default" | ||
> | ||
Permissions | ||
</span> | ||
</p> | ||
Permissions | ||
</h2> | ||
</div> | ||
</div> | ||
<div | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,13 +77,7 @@ export const PermissionsPage = () => { | |
/> | ||
} | ||
> | ||
<Text | ||
as="span" | ||
variant={TextVariant.headingMd} | ||
textAlign={TextAlign.Center} | ||
> | ||
{t('permissions')} | ||
</Text> | ||
Comment on lines
-80
to
-86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing extra html element to reduce html bloat and to maintain heading consistency |
||
{t('permissions')} | ||
</Header> | ||
<Content padding={0}> | ||
<Box ref={headerRef}></Box> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,11 @@ exports[`SendPage render and initialization should render correctly even when a | |
<div | ||
class="mm-box" | ||
> | ||
<h4 | ||
<h2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating header tag |
||
class="mm-box mm-text mm-text--heading-sm mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
> | ||
Send | ||
</h4> | ||
</h2> | ||
</div> | ||
</div> | ||
<div | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,11 @@ exports[`Bridge renders the component with initial props 1`] = ` | |
<div | ||
class="mm-box" | ||
> | ||
<h4 | ||
<h2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating header tag |
||
class="mm-box mm-text mm-text--heading-sm mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
> | ||
Bridge | ||
</h4> | ||
</h2> | ||
</div> | ||
<div | ||
class="mm-box mm-box--display-flex mm-box--justify-content-flex-end" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes empty p and div tag when
children
is not present as in the example of the NFT details page header