Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-plugin-theme-ui,docs): Dependency Updates #2138

Merged
merged 5 commits into from Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/gatsby-plugin/gatsby-config.js
@@ -1,3 +1,4 @@
/** @type {import('gatsby').GatsbyConfig} */
module.exports = {
plugins: ['gatsby-plugin-mdx', 'gatsby-plugin-theme-ui'],
}
18 changes: 7 additions & 11 deletions examples/gatsby-plugin/package.json
Expand Up @@ -6,25 +6,21 @@
"author": "Brent Jackson <jxnblk@gmail.com>",
"license": "MIT",
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"clean": "gatsby clean",
"build": "gatsby build"
},
"dependencies": {
"@emotion/react": "^11.8.1",
"@emotion/styled": "^11.8.1",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"gatsby": "^2.6.3",
"gatsby-plugin-mdx": "^1.6.0",
"gatsby": "^4.7.2",
"gatsby-plugin-mdx": "^3.7.1",
"gatsby-plugin-theme-ui": "latest",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"theme-ui": "latest"
},
"devDependencies": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those seemed unused

"@testing-library/react": "^9.1.3",
"husky": ">=4.0.7",
"jest": "^24.8.0",
"lint-staged": "10",
"react-test-renderer": "^17.0.1"
}
}
5 changes: 3 additions & 2 deletions examples/gatsby-plugin/src/gatsby-plugin-theme-ui/index.js
@@ -1,6 +1,5 @@
const theme = {
useCustomProperties: true,
initialColorMode: 'light',
initialColorModeName: 'light',
LekoArts marked this conversation as resolved.
Show resolved Hide resolved
colors: {
text: '#000',
background: '#fff',
Expand All @@ -26,6 +25,8 @@ const theme = {
fontFamily: 'body',
fontWeight: 'body',
lineHeight: 'body',
py: 2,
px: 4,
},
a: {
color: 'primary',
Expand Down
1 change: 1 addition & 0 deletions examples/gatsby/gatsby-config.js
@@ -1,3 +1,4 @@
/** @type {import('gatsby').GatsbyConfig} */
module.exports = {
plugins: ['gatsby-plugin-mdx'],
}
15 changes: 9 additions & 6 deletions examples/gatsby/package.json
Expand Up @@ -6,21 +6,24 @@
"author": "Brent Jackson <jxnblk@gmail.com>",
"license": "MIT",
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"clean": "gatsby clean",
"build": "gatsby build"
},
"dependencies": {
"@emotion/react": "^11.8.1",
"@emotion/styled": "^11.8.1",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"gatsby": "^2.6.3",
"gatsby-plugin-mdx": "^1.6.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"gatsby": "^4.7.2",
"gatsby-plugin-mdx": "^3.7.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"theme-ui": "latest"
},
"devDependencies": {
"@types/react": "^16.9.55",
"typescript": "^4.4.3"
"@types/react": "^17.0.39",
"typescript": "^4.5.5"
}
}
5 changes: 1 addition & 4 deletions examples/gatsby/src/layout.tsx
@@ -1,11 +1,8 @@
/** @jsx jsx */
import { FC } from 'react'
import { jsx, Box, Container } from 'theme-ui'
import { useBreakpointIndex } from '@theme-ui/match-media'
import { Box, Container } from 'theme-ui'

export const Layout: FC = ({ children }) => {
const index = useBreakpointIndex({ defaultIndex: 2 })
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not used anywhere

console.log('breakpoint index', index)
return (
<Box sx={{ py: 2, px: 4 }}>
<Box as="header">
Expand Down
2 changes: 1 addition & 1 deletion examples/gatsby/src/pages/index.mdx
Expand Up @@ -6,5 +6,5 @@ export default Layout

This page is written in [MDX][] and styled with [Theme UI][].

[theme ui]: https://theme-ui.now.sh
[theme ui]: https://theme-ui.com/
[mdx]: https://mdxjs.com
3 changes: 2 additions & 1 deletion examples/gatsby/src/theme.ts
@@ -1,6 +1,7 @@
import { Theme } from 'theme-ui'
import type { Theme } from 'theme-ui'

const theme: Theme = {
initialColorModeName: 'light',
LekoArts marked this conversation as resolved.
Show resolved Hide resolved
colors: {
text: '#000',
background: '#fff',
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/pages/getting-started/gatsby.mdx
Expand Up @@ -7,7 +7,7 @@ title: Getting Started with Gatsby
To use Theme UI with [Gatsby][], install and use [`gatsby-plugin-theme-ui`](/packages/gatsby-plugin).

```sh
npm i theme-ui gatsby-plugin-theme-ui
npm i theme-ui gatsby-plugin-theme-ui @emotion/react @emotion/styled @mdx-js/react@v1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gatsby-plugin-mdx doesn't support ESM-only MDX v2 yet, so people need to install v1

```

Add the plugin to your `gatsby-config.js`.
Expand Down Expand Up @@ -37,4 +37,4 @@ Use the [`sx` prop](/sx-prop), [color modes](/color-modes), and other features j

For more information, see the documentation for [`gatsby-plugin-theme-ui`](/packages/gatsby-plugin).

[gatsby]: https://gatsbyjs.org
[gatsby]: https://www.gatsbyjs.com
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-theme-ui/README.md
Expand Up @@ -3,7 +3,7 @@
Gatsby plugin for adding Theme UI context

```sh
npm i theme-ui gatsby-plugin-theme-ui
npm i theme-ui gatsby-plugin-theme-ui @emotion/react @emotion/styled @mdx-js/react@v1
```

```js
Expand Down
5 changes: 4 additions & 1 deletion packages/gatsby-plugin-theme-ui/package.json
Expand Up @@ -7,7 +7,10 @@
"peerDependencies": {
"gatsby": "^2.0.0 || ^3.0.0 || ^4.0.0",
"react": "^16 || ^17",
"theme-ui": ">=0.12.0"
"theme-ui": ">=0.12.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@mdx-js/react": "^1"
},
"keywords": [
"gatsby",
Expand Down