feat: masonary

This commit is contained in:
bartosz-lipinski 2021-04-10 21:33:33 -05:00
parent e1ae17a384
commit f017bc7c4a
5 changed files with 18 additions and 3 deletions

View File

@ -1,7 +1,6 @@
.art-card { .art-card {
min-width: 200px; min-width: 200px;
max-width: 300px;
margin-top: 30px; margin-top: 30px;
filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1)); filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));
border-radius: 8px; border-radius: 8px;
@ -29,4 +28,11 @@
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
}
.small {
max-width: 300px;
margin-left: auto;
margin-right: auto;
} }

View File

@ -14,6 +14,7 @@ export const ArtCard = ({
description, description,
artist, artist,
preview, preview,
small,
}: { }: {
image?: string; image?: string;
category?: MetadataCategory category?: MetadataCategory
@ -22,11 +23,12 @@ export const ArtCard = ({
description?: string; description?: string;
artist?: string; artist?: string;
preview?: boolean; preview?: boolean;
small?: boolean
}) => { }) => {
return ( return (
<Card <Card
hoverable={true} hoverable={true}
className="art-card" className={`art-card ${small ? 'small' : ''}`}
cover={<ArtContent category={category} content={image} />} cover={<ArtContent category={category} content={image} />}
> >
<Meta <Meta

View File

@ -278,6 +278,7 @@ const InfoStep = (props: {
category={props.attributes.category} category={props.attributes.category}
name={props.attributes.name} name={props.attributes.name}
symbol={props.attributes.symbol} symbol={props.attributes.symbol}
small={true}
/> />
)} )}
</Col> </Col>
@ -368,6 +369,7 @@ const RoyaltiesStep = (props: {
category={props.attributes.category} category={props.attributes.category}
name={props.attributes.name} name={props.attributes.name}
symbol={props.attributes.symbol} symbol={props.attributes.symbol}
small={true}
/> />
)} )}
</Col> </Col>
@ -465,6 +467,7 @@ const LaunchStep = (props: {
category={props.attributes.category} category={props.attributes.category}
name={props.attributes.name} name={props.attributes.name}
symbol={props.attributes.symbol} symbol={props.attributes.symbol}
small={true}
/> />
)} )}
</Col> </Col>

View File

@ -42,7 +42,11 @@ a:active {
display: -ms-flexbox; /* Not needed if autoprefixing */ display: -ms-flexbox; /* Not needed if autoprefixing */
display: flex; display: flex;
width: auto; width: auto;
margin-left: auto;
margin-right: auto;
margin-left: -30px;
} }
.my-masonry-grid_column { .my-masonry-grid_column {
padding-left: 30px; /* gutter size */ padding-left: 30px; /* gutter size */
background-clip: padding-box; background-clip: padding-box;

View File

@ -31,7 +31,7 @@ export const HomeView = () => {
<Layout> <Layout>
<Content style={{ display: 'flex', flexWrap: 'wrap' }}> <Content style={{ display: 'flex', flexWrap: 'wrap' }}>
<Col style={{ width: '100%' }}> <Col style={{ width: '100%' }}>
<Row style={{ marginBottom: 30, marginTop: 20, fontSize: 20, fontWeight: 600 }}>Featured</Row> <Row style={{ marginTop: 20, fontSize: 20, fontWeight: 600 }}>Featured</Row>
<Row> <Row>
<Masonry <Masonry
breakpointCols={breakpointColumnsObj} breakpointCols={breakpointColumnsObj}