1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Remove faux <header> elements (#8131)

We have been using the HTML `header` tag in various footers. The
`footer` tag is generally more appropriate for use in a footer.
This commit is contained in:
Mark Stacey 2020-02-27 18:00:20 -04:00 committed by GitHub
parent 4996a00cde
commit ac4e1d4e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 20 deletions

View File

@ -24,7 +24,7 @@
} }
&__footer { &__footer {
header { footer {
padding-top: 12px; padding-top: 12px;
padding-bottom: 12px; padding-bottom: 12px;
} }

View File

@ -261,7 +261,7 @@
border-top: none; border-top: none;
align-items: center; align-items: center;
header { footer {
width: 300px; width: 300px;
} }
} }

View File

@ -55,7 +55,7 @@
border-top: 1px solid $geyser; border-top: 1px solid $geyser;
flex: 0 0 auto; flex: 0 0 auto;
header { footer {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
justify-content: center; justify-content: center;
@ -63,7 +63,7 @@
flex: 0 0 auto; flex: 0 0 auto;
} }
footer { &-secondary {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
justify-content: space-around; justify-content: space-around;

View File

@ -38,7 +38,7 @@ export default class PageContainerFooter extends Component {
return ( return (
<div className="page-container__footer"> <div className="page-container__footer">
<header> <footer>
{!hideCancel && ( {!hideCancel && (
<Button <Button
type={cancelButtonType || 'default'} type={cancelButtonType || 'default'}
@ -61,12 +61,12 @@ export default class PageContainerFooter extends Component {
> >
{ submitText || this.context.t('next') } { submitText || this.context.t('next') }
</Button> </Button>
</header> </footer>
{children && ( {children && (
<footer> <div className="page-container__footer-secondary">
{children} {children}
</footer> </div>
)} )}
</div> </div>

View File

@ -27,7 +27,7 @@ describe('Page Footer', function () {
assert.equal(wrapper.find('.page-container__footer').length, 1) assert.equal(wrapper.find('.page-container__footer').length, 1)
}) })
it('should render a footer inside page-container__footer when given children', function () { it('should render a secondary footer inside page-container__footer when given children', function () {
const wrapper = shallow( const wrapper = shallow(
<PageFooter> <PageFooter>
<div>Works</div> <div>Works</div>
@ -35,7 +35,7 @@ describe('Page Footer', function () {
{ context: { t: sinon.spy((k) => `[${k}]`) } } { context: { t: sinon.spy((k) => `[${k}]`) } }
) )
assert.equal(wrapper.find('.page-container__footer footer').length, 1) assert.equal(wrapper.find('.page-container__footer-secondary').length, 1)
}) })
it('renders two button components', function () { it('renders two button components', function () {

View File

@ -106,7 +106,7 @@ export default class ConfirmAddSuggestedToken extends Component {
</div> </div>
</div> </div>
<div className="page-container__footer"> <div className="page-container__footer">
<header> <footer>
<Button <Button
type="default" type="default"
large large
@ -130,7 +130,7 @@ export default class ConfirmAddSuggestedToken extends Component {
> >
{ this.context.t('addToken') } { this.context.t('addToken') }
</Button> </Button>
</header> </footer>
</div> </div>
</div> </div>
) )

View File

@ -86,7 +86,7 @@ export default class ConfirmAddToken extends Component {
</div> </div>
</div> </div>
<div className="page-container__footer"> <div className="page-container__footer">
<header> <footer>
<Button <Button
type="default" type="default"
large large
@ -109,7 +109,7 @@ export default class ConfirmAddToken extends Component {
> >
{ this.context.t('addTokens') } { this.context.t('addTokens') }
</Button> </Button>
</header> </footer>
</div> </div>
</div> </div>
) )

View File

@ -49,7 +49,7 @@
font-weight: normal; font-weight: normal;
line-height: 21px; line-height: 21px;
font-size: 16px; font-size: 16px;
margin-top: 12px; margin-top: 12px;
} }
&__committments { &__committments {
@ -128,9 +128,9 @@
margin-right: 16px; margin-right: 16px;
} }
header { footer {
padding: 0px; padding: 0px;
} }
} }
} }
} }

View File

@ -102,7 +102,7 @@ class RevealSeedPage extends Component {
renderPasswordPromptFooter () { renderPasswordPromptFooter () {
return ( return (
<div className="page-container__footer"> <div className="page-container__footer">
<header> <footer>
<Button <Button
type="default" type="default"
large large
@ -120,7 +120,7 @@ class RevealSeedPage extends Component {
> >
{this.context.t('next')} {this.context.t('next')}
</Button> </Button>
</header> </footer>
</div> </div>
) )
} }

View File

@ -60,7 +60,7 @@
width: 93%; width: 93%;
} }
header { footer {
padding: 10px 0px; padding: 10px 0px;
} }
} }