import React from "react";
import styled from "styled-components";

const StyledSection = styled.section`
  display: grid;
  padding: 1.5rem;

  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "title"
    "content";

  * {
    grid-area: content;
  }

  & > h1,
  & > h2,
  & > h3,
  & > h4,
  & > h5,
  & > h6 {
    text-align: center;
    grid-area: title;
    margin: 1rem 0;
  }

  p {
    margin-top: 0;
  }
`;

const FullWidthSection: React.FC<React.HTMLAttributes<HTMLDivElement>> = (props) => (
  <StyledSection {...props} />
);

export default FullWidthSection;
