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.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 4996a00cde
commit ac4e1d4e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui/app/components/app/gas-customization/gas-modal-page-container/index.scss
  2. 2
      ui/app/components/app/permission-page-container/index.scss
  3. 4
      ui/app/components/ui/page-container/index.scss
  4. 8
      ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js
  5. 4
      ui/app/components/ui/page-container/page-container-footer/tests/page-container-footer.component.test.js
  6. 4
      ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
  7. 4
      ui/app/pages/confirm-add-token/confirm-add-token.component.js
  8. 6
      ui/app/pages/first-time-flow/metametrics-opt-in/index.scss
  9. 4
      ui/app/pages/keychains/reveal-seed.js
  10. 2
      ui/app/pages/settings/networks-tab/index.scss

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

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

@ -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;

@ -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>

@ -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 () {

@ -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>
) )

@ -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>
) )

@ -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;
} }
} }
} }
} }

@ -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>
) )
} }

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

Loading…
Cancel
Save