UNPKG

1.08 kBJavaScriptView Raw
1import React from 'react'
2import PropTypes from 'prop-types'
3import styled from 'styled-components'
4
5import { FlexCol, FlexRow, OutfitCards } from 'SRC'
6
7const OutfitsListing = styled(({className, element, headerContent, outfits}) => {
8 return (
9 <div className={className}>
10 {headerContent &&
11 <FlexRow constrained>
12 <FlexCol className='roa-outfits-header' element='header'>
13 {headerContent}
14 </FlexCol>
15 </FlexRow>
16 }
17 <OutfitCards element={element} outfits={outfits} />
18 </div>
19 )
20})`
21 .roa-outfits-header {
22 margin: 1.6rem 2.4rem 0.8rem 2.4rem;
23 > * {
24 flex-basis: 100%;
25 text-align: center;
26 margin: 0.8rem;
27 }
28 }
29
30 ${props => props.theme.breakpointsVerbose.aboveTablet`
31 .roa-outfits-header {
32 margin: 2.4rem 2.4rem 1.6rem 2.4rem;
33 }
34 `}
35`
36OutfitsListing.propTypes = {
37 element: PropTypes.node,
38 headerContent: PropTypes.array,
39 outfits: PropTypes.array
40}
41
42OutfitsListing.defaultProp = {
43 element: 'a',
44 outfits: []
45}
46/** @component */
47export default OutfitsListing