File tree Expand file tree Collapse file tree 7 files changed +15
-15
lines changed Expand file tree Collapse file tree 7 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 11import React from "react"
22import { graphql } from "gatsby"
33
4- import { rhythm } from "../../utils/typography "
4+ import { space } from "../../utils/presets "
55
66const Example = ( { example } ) => (
77 < div className = "gatsby-highlight" >
@@ -20,7 +20,7 @@ const ExamplesBlock = ({ definition }) => {
2020 if ( definition . examples && definition . examples . length > 0 ) {
2121 return (
2222 < div >
23- < h4 css = { { marginTop : rhythm ( 1 ) } } > Example</ h4 >
23+ < h4 css = { { marginTop : space [ 6 ] } } > Example</ h4 >
2424 { ` ` }
2525 { definition . examples . map ( ( example , i ) => (
2626 < Example example = { example } key = { `example ${ i } ` } />
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { graphql } from "gatsby"
33
44import DocBlock from "./doc-block"
55
6- import { rhythm } from "../../utils/typography "
6+ import { space } from "../../utils/presets "
77
88export default ( {
99 docs,
@@ -15,7 +15,7 @@ export default ({
1515 < div
1616 id = { definition . name }
1717 key = { `reference list ${ definition . name } ` }
18- css = { { marginBottom : rhythm ( 1 ) } }
18+ css = { { marginBottom : space [ 6 ] } }
1919 >
2020 { i !== 0 && < hr /> }
2121 < DocBlock
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import { css } from "@emotion/core"
44
55import DocBlock from "./doc-block"
66import { SubHeader } from "./utils"
7- import { rhythm } from "../../utils/typography "
7+ import { space } from "../../utils/presets "
88
99const List = ( { elements, level, ignoreParams } ) => (
1010 < ul
1111 css = { css `
1212 list-style-type: none;
13- margin-top: ${ rhythm ( 0.5 ) } ;
14- margin-left: ${ rhythm ( 0.75 ) } ;
13+ margin-top: ${ space [ 3 ] } ;
14+ margin-left: ${ space [ 4 ] } ;
1515 margin-bottom: 0;
1616 ` }
1717 >
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { graphql } from "gatsby"
33
44import DocBlock from "./doc-block"
55import { SubHeader } from "./utils"
6- // import { rhythm } from "../../utils/typography"
76
87const ReturnBlock = ( { definition, level } ) => {
98 if ( definition . returns && definition . returns . length > 0 ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import { css } from "@emotion/core"
55import { graphql } from "gatsby"
66
77import { SubHeader } from "./utils"
8- import { options , rhythm } from "../../utils/typography"
8+ import { options } from "../../utils/typography"
9+ import { space } from "../../utils/presets"
910
1011const Wrapper = styled ( `span` ) `
1112 font-family: ${ options . headerFontFamily . join ( `,` ) } ;
@@ -27,7 +28,7 @@ const Wrapper = styled(`span`)`
2728 props . block &&
2829 css `
2930 display: block;
30- margin-top: ${ rhythm ( 0.35 ) } ;
31+ margin-top: ${ space [ 2 ] } ;
3132 ` } ;
3233`
3334
Original file line number Diff line number Diff line change 11import React from "react"
22import { css } from "@emotion/core"
33
4- import { rhythm } from "../../utils/typography "
4+ import { space } from "../../utils/presets "
55
66export const Header = ( { children, level } ) => {
77 const Tag = `h${ Math . min ( 3 + level * 2 , 6 ) } `
@@ -12,7 +12,7 @@ export const Header = ({ children, level }) => {
1212 margin : 0 ,
1313 ...( level > 0
1414 ? {
15- marginTop : rhythm ( 0.35 ) ,
15+ marginTop : space [ 2 ] ,
1616 }
1717 : { } ) ,
1818 } }
@@ -28,7 +28,7 @@ export const SubHeader = ({ children, level }) => {
2828 < Tag
2929 css = { css `
3030 margin : 0 ;
31- margin-top : ${ rhythm ( 0.35 ) } ;
31+ margin-top : ${ space [ 2 ] } ;
3232 ` }
3333 >
3434 { children }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Helmet from "react-helmet"
44import sortBy from "lodash/sortBy"
55
66import APIReference from "../../components/api-reference"
7- import { rhythm } from "../../utils/typography "
7+ import { space } from "../../utils/presets "
88import Layout from "../../components/layout"
99import Container from "../../components/container"
1010import { itemListDocs } from "../../utils/sidebar/item-list"
@@ -72,7 +72,7 @@ exports.createPages = ({ actions, reporter }) => {
7272 Check documentation of specific APIs in{ ` ` }
7373 < Link to = "/docs/node-apis/" > Gatsby Node APIs</ Link > for details.
7474 </ p >
75- < h2 id = "shared-helpers" css = { { marginBottom : rhythm ( 1 / 2 ) } } >
75+ < h2 id = "shared-helpers" css = { { marginBottom : space [ 3 ] } } >
7676 Shared helpers
7777 </ h2 >
7878 < ul >
You can’t perform that action at this time.
0 commit comments