diff options
author | Megan Pearson <megan.e.pearson@gmail.com> | 2018-10-23 16:18:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 16:18:12 +0800 |
commit | e624759bc787e826f8d7011352754f62d0a84a02 (patch) | |
tree | ce644376d49276540fe5df8cc2b65e460f2e9a6b /packages/dev-tools-pages/ts/components/Compiler.tsx | |
parent | bc029df0820dfffe9e46bedaf1b42191c2cd70ed (diff) | |
parent | 0836ab370e179f197f654034e8e813c8617f73cb (diff) | |
download | dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.tar dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.tar.gz dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.tar.bz2 dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.tar.lz dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.tar.xz dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.tar.zst dexon-sol-tools-e624759bc787e826f8d7011352754f62d0a84a02.zip |
Merge pull request #4 from bakkenbaeck/feature/moreresponsive
Feature/moreresponsive
Diffstat (limited to 'packages/dev-tools-pages/ts/components/Compiler.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/components/Compiler.tsx | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/packages/dev-tools-pages/ts/components/Compiler.tsx b/packages/dev-tools-pages/ts/components/Compiler.tsx index bda29dc1f..a5b92da13 100644 --- a/packages/dev-tools-pages/ts/components/Compiler.tsx +++ b/packages/dev-tools-pages/ts/components/Compiler.tsx @@ -1,22 +1,30 @@ import * as React from 'react'; import styled from 'styled-components'; -import { colors } from '../variables'; +import { media, colors } from '../variables'; +import Container from './Container'; import InlineCode from './InlineCode'; const Cards = styled.dl` - display: grid; - grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr)); - align-items: start; - grid-gap: 1.25rem; - margin-top: 0; - margin-bottom: 0; + column-count: 3; + column-gap: 1.25rem; + + ${media.small` + column-count: 1; + `}: ; `; const Card = styled.div` background-color: ${colors.lightGray}; padding: 3.125rem; padding-bottom: 2.5rem; + display: inline-block; + margin-bottom: 1.25rem; + width: 100%; + + ${media.small` + padding: 1.875rem; + `}; `; const Dt = styled.dt` @@ -63,14 +71,16 @@ const cards = [ function Compiler() { return ( - <Cards> - {cards.map(card => ( - <Card key={card.title.split(' ').join('-')}> - <Dt>{card.title}</Dt> - <Dd>{card.body}</Dd> - </Card> - ))} - </Cards> + <Container wide> + <Cards> + {cards.map(card => ( + <Card key={card.title.split(' ').join('-')}> + <Dt>{card.title}</Dt> + <Dd>{card.body}</Dd> + </Card> + ))} + </Cards> + </Container> ); } |