|
|
@@ -1,8 +1,9 @@
|
|
|
import ListGroup from "./components/ListGroup";
|
|
|
-import Alert from "./components/Alert";
|
|
|
+import MyAlert from "./components/Alert";
|
|
|
import { useState } from "react";
|
|
|
import MyButt from "./components/MyButt";
|
|
|
import Button from "@mui/material/Button";
|
|
|
+import Alert from "@mui/material/Alert";
|
|
|
|
|
|
// Following tutorial https://www.youtube.com/watch?v=SqcY0GlETPk
|
|
|
|
|
|
@@ -21,12 +22,20 @@ function App() {
|
|
|
return (
|
|
|
<div>
|
|
|
{alertVisible && (
|
|
|
- <Alert onClose={() => setAlertVisible(false)}>This is bad</Alert>
|
|
|
+ <Alert onClose={() => setAlertVisible(false)} severity="error">
|
|
|
+ This is bad
|
|
|
+ </Alert>
|
|
|
)}
|
|
|
<MyButt name="LöBöttån!" onClick={() => setAlertVisible(true)}>
|
|
|
Maan
|
|
|
</MyButt>
|
|
|
- {<Button variant="contained">Hello World</Button>}
|
|
|
+ <Button
|
|
|
+ disabled={alertVisible}
|
|
|
+ variant="contained"
|
|
|
+ onMouseEnter={() => setAlertVisible(true)}
|
|
|
+ >
|
|
|
+ Hello World
|
|
|
+ </Button>
|
|
|
<ListGroup
|
|
|
items={items}
|
|
|
heading="Man shit list"
|