Button with onhover and function paramter
Man kann eine Funktion als Parameter dem button übergeben, sodass er diese ausführt, sobald auf ihn geklickt wird
This commit is contained in:
+5
-1
@@ -1,10 +1,14 @@
|
||||
import './App.css';
|
||||
import Button from "./components/Button";
|
||||
import {arrowLeft} from "./Icons";
|
||||
import {arrowRight} from "./Icons";
|
||||
|
||||
function App() {
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<Button/>
|
||||
<Button icon={arrowLeft} iconWidth={50} iconHeight={50} width={200} height={100}/>
|
||||
<Button text={"Hallo"} onClick={() => {console.log("test")}}></Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user