Skip to content

Commit b124d7f

Browse files
committed
Tidy stuff from #12087
1 parent 9424ae8 commit b124d7f

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

www/src/components/api-reference/examples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { graphql } from "gatsby"
33

4-
import { rhythm } from "../../utils/typography"
4+
import { space } from "../../utils/presets"
55

66
const 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}`} />

www/src/components/api-reference/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { graphql } from "gatsby"
33

44
import DocBlock from "./doc-block"
55

6-
import { rhythm } from "../../utils/typography"
6+
import { space } from "../../utils/presets"
77

88
export 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

www/src/components/api-reference/params.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { css } from "@emotion/core"
44

55
import DocBlock from "./doc-block"
66
import { SubHeader } from "./utils"
7-
import { rhythm } from "../../utils/typography"
7+
import { space } from "../../utils/presets"
88

99
const 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
>

www/src/components/api-reference/returns.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { graphql } from "gatsby"
33

44
import DocBlock from "./doc-block"
55
import { SubHeader } from "./utils"
6-
// import { rhythm } from "../../utils/typography"
76

87
const ReturnBlock = ({ definition, level }) => {
98
if (definition.returns && definition.returns.length > 0) {

www/src/components/api-reference/signature.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { css } from "@emotion/core"
55
import { graphql } from "gatsby"
66

77
import { SubHeader } from "./utils"
8-
import { options, rhythm } from "../../utils/typography"
8+
import { options } from "../../utils/typography"
9+
import { space } from "../../utils/presets"
910

1011
const 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

www/src/components/api-reference/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { css } from "@emotion/core"
33

4-
import { rhythm } from "../../utils/typography"
4+
import { space } from "../../utils/presets"
55

66
export 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}

www/src/pages/docs/node-api-helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Helmet from "react-helmet"
44
import sortBy from "lodash/sortBy"
55

66
import APIReference from "../../components/api-reference"
7-
import { rhythm } from "../../utils/typography"
7+
import { space } from "../../utils/presets"
88
import Layout from "../../components/layout"
99
import Container from "../../components/container"
1010
import { 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>

0 commit comments

Comments
 (0)