1 | import React from 'react'
|
2 | import PropTypes from 'prop-types'
|
3 | import styled from 'styled-components'
|
4 |
|
5 | import { FlexCol, FlexRow, OutfitCards } from 'SRC'
|
6 |
|
7 | const 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 | `
|
36 | OutfitsListing.propTypes = {
|
37 | element: PropTypes.node,
|
38 | headerContent: PropTypes.array,
|
39 | outfits: PropTypes.array
|
40 | }
|
41 |
|
42 | OutfitsListing.defaultProp = {
|
43 | element: 'a',
|
44 | outfits: []
|
45 | }
|
46 |
|
47 | export default OutfitsListing
|