Skip to content

Commit

Permalink
Implement toggle prop to decorate Content section components
Browse files Browse the repository at this point in the history
This allows to add background decorations to the `Content` `ontainer of
the core "Section" container component by simply adding the `decorated`
boolean prop instead of creating a new styled component with a
`position: relative` attribute.

GH-115
  • Loading branch information
arcticicestudio committed Jan 26, 2019
1 parent b0512cd commit e026ff9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/containers/core/Section/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import CoreContent from "containers/core/Content";
const Content = styled(CoreContent)`
padding-top: ${({ compact }) => !compact && "2.5em"};
padding-bottom: ${({ compact }) => !compact && "2.5em"};
position: ${({ decorated }) => decorated && "relative"};
${({ theme }) => theme.media.tabletLandscape`
padding-top: ${({ compact }) => !compact && "5em"};
Expand Down

0 comments on commit e026ff9

Please sign in to comment.