Skip to content

Commit 44cde91

Browse files
committed
Fixed canvas's not overlapping
1 parent 5074c1e commit 44cde91

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

node_modules/.bin/cssesc

-1
This file was deleted.

node_modules/.bin/cssesc

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/style.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
canvas {
2+
position: absolute;
3+
}

src/components/App.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class App extends React.Component {
1111
render() {
1212
return (
1313
<div>
14-
<Moon />
1514
<Wave />
15+
<Moon />
1616
</div>
1717
)
1818
}

src/components/P5Wrapper.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import p5 from 'p5'
3+
import '../../public/style.css'
34

45
export default class P5Wrapper extends React.Component {
56
componentDidMount() {

webpack.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ module.exports = {
2222
loader: "html-loader"
2323
}
2424
]
25+
},
26+
{
27+
test: /\.css$/,
28+
use: [
29+
"style-loader",
30+
"css-loader"
31+
]
2532
}
2633
]
2734
},

0 commit comments

Comments
 (0)