Commit ff5d5c50 authored by Ismael Martínez's avatar Ismael Martínez Committed by Tim Neutkens

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

parent 02e75cfd
...@@ -31,7 +31,7 @@ yarn ...@@ -31,7 +31,7 @@ yarn
yarn dev 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 ## The idea behind the example
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
"color-primary-contrast": "var(--color-dark-contrast)", "color-primary-contrast": "var(--color-dark-contrast)",
"color-accent-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 ThemeProvider from 'react-toolbox/lib/ThemeProvider'
import theme from '../static/theme' import theme from '../theme'
import Head from 'next/head' import Head from 'next/head'
import Button from 'react-toolbox/lib/button/Button' import Button from 'react-toolbox/lib/button/Button'
...@@ -7,7 +7,7 @@ import Button from 'react-toolbox/lib/button/Button' ...@@ -7,7 +7,7 @@ import Button from 'react-toolbox/lib/button/Button'
export default () => ( export default () => (
<div> <div>
<Head> <Head>
<link href='/static/theme.css' rel='stylesheet' /> <link href='/theme.css' rel='stylesheet' />
</Head> </Head>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Button raised primary> <Button raised primary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment