提交 ff5d5c50 编写于 作者: I Ismael Martínez 提交者: Tim Neutkens

Update with-react-toolbox example to use /public (#9099)

上级 02e75cfd
......@@ -31,7 +31,7 @@ yarn
yarn dev
```
Notice that `yarn toolbox` (or `npm run toolbox`) should be rerun every time the `"reactToolbox"` configuration in `package.json` is changed, in order to update `static/theme.js` and `static/theme.css`. The `"reactToolbox"` configuration includes styling, and the list of react-toolbox components to include.
Notice that `yarn toolbox` (or `npm run toolbox`) should be rerun every time the `"reactToolbox"` configuration in `package.json` is changed, in order to update `/theme.js` and `public/theme.css`. The `"reactToolbox"` configuration includes styling, and the list of react-toolbox components to include.
## The idea behind the example
......
......@@ -30,6 +30,7 @@
"color-primary-contrast": "var(--color-dark-contrast)",
"color-accent-contrast": "var(--color-dark-contrast)"
},
"output": "static"
"output": "public",
"javascript": "./theme.js"
}
}
import ThemeProvider from 'react-toolbox/lib/ThemeProvider'
import theme from '../static/theme'
import theme from '../theme'
import Head from 'next/head'
import Button from 'react-toolbox/lib/button/Button'
......@@ -7,7 +7,7 @@ import Button from 'react-toolbox/lib/button/Button'
export default () => (
<div>
<Head>
<link href='/static/theme.css' rel='stylesheet' />
<link href='/theme.css' rel='stylesheet' />
</Head>
<ThemeProvider theme={theme}>
<Button raised primary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册