hackthevalley/hack-the-ui

Create Section Component

Closed this issue · 0 comments

Description

The section component would be used to ensure the content of the page doesn't go beyond a certain width. It's a fairly simple component compared to all of the components we would be implementing.

Props

  • as: Defaults to div. This changes the elementType of the component
  • type: Changes the default prop of as. But this changes the vertical padding of the component based on what it is. The types we have are nav, section, footer.
  • backgroundColor: Changes the background color of component. Has all colors in colors.$colors
  • atmosphere: Give it a better name if think of one, but basically allows for sticking elements outside of the max-width area

Additional Information

  • Make sure there is some padding to ensure the content doesn't stick to the edge of the device.
  • Use rem.
  • Content when smaller than device width should be centered
  • Accept props spread and classname