Skip to content

Commit 8e7d657

Browse files
committed
📝 Remove createTheme info
1 parent 88664a2 commit 8e7d657

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

src/about.mdx

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ const MyApp = () => (
4141

4242
```
4343
import React from 'react'
44-
import { createTheme } from 'pss'
4544
import { ThemeProvider } from 'emotion-theming'
4645
47-
const myTheme = createTheme({
46+
const myTheme = {
4847
grid: 12,
4948
media: {
5049
M: '(max-width: 600px)',
@@ -73,7 +72,7 @@ const myTheme = createTheme({
7372
fg: '#fff'
7473
}
7574
}
76-
})
75+
}
7776
7877
const MyApp = () => (
7978
<ThemeProvider theme={myTheme}>

src/current-media-provider/about.mdx

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ import { CurrentMediaProvider, CurrentMediaConsumer, withCurrentMedia } from 'ps
2323

2424
```js
2525
import { ThemeProvider } from 'emotion-theming'
26-
import { createTheme } from 'pss'
2726

28-
<ThemeProvider theme={createTheme({ media: { M: '(max-width: 600px)' } })}>
27+
<ThemeProvider theme={{ media: { M: '(max-width: 600px)' } }}>
2928
<CurrentMediaProvider>
3029
{/* components */}
3130
</CurrentMediaProvider>

src/text/about.mdx

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ import { Text } from 'pss-components'
3535
See [textStyle](https://github.com/exah/pss/blob/master/docs/api.md#textstyle) docs.
3636

3737
```js
38-
import { createTheme } from 'pss-components'
39-
40-
const theme = createTheme({
38+
const theme = {
4139
font: {
4240
default: 'Helvetica, system-ui, sans-serif',
4341
serif: 'Times New Roman, serif'
@@ -56,7 +54,7 @@ const theme = createTheme({
5654
fontWeight: 'bold'
5755
}
5856
}
59-
})
57+
}
6058
```
6159

6260
## Examples

src/theme.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { createTheme } from 'pss'
21
import { createElement } from 'react'
32
import { ThemeProvider } from 'emotion-theming'
43

5-
const theme = createTheme({
4+
const theme = {
65
grid: 12,
76
media: {
87
M: '(max-width: 600px)',
@@ -49,7 +48,7 @@ const theme = createTheme({
4948
fontWeight: 'bold'
5049
}
5150
}
52-
})
51+
}
5352

5453
export {
5554
theme

0 commit comments

Comments
 (0)