How to use the @primer/components.Heading.defaultProps function in @primer/components

To help you get started, we’ve selected a few @primer/components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github primer / primer.style / src / components / Layout.js View on Github external
import {Box, Heading} from '@primer/components'
import '@primer/css/layout/index.scss'
import {Head, Header} from '@primer/gatsby-theme-doctocat'
import React from 'react'

// FIXME: this works around known issues with Heading's default prop {m: 0}
Object.assign(Heading.defaultProps, {
  m: null,
  mt: 0,
  mb: 0
})

export default function Layout({pageContext, children}) {
  return (
    <>
      
      <header>
      
        {children}
      
    
  )
}</header>