Semantics
Using HTML element
import React from 'react'
import { Box } from 'atomic-layout'
export const Header = (props) => (
<Box as="header" {...props} />
)Using React component
import React from 'react'
import { Box } from 'atomic-layout'
import styled from 'styled-components'
const Header = (props) => (
// Spreading the props assigns "className" (SC)
// and the props from Atomic Layout.
<div {...props} />
)
export const MyComponent = () => (
<Box as={Header} height={50} padding={10} />
)Custom areas components
Last updated