Add eingabefeld;

This commit is contained in:
Manuel Prodinger
2022-03-23 12:18:38 +01:00
parent aa9c894de1
commit 73efc44960
2 changed files with 30 additions and 12 deletions
+3 -12
View File
@@ -1,19 +1,10 @@
import logo from "./logo.svg";
import Test from "./Components/test";
import Eingabefelder from "./Components/eingabefelder";
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p className="underline hover:text-blue-500">
Edit <code>src/App.js</code> and save to reload.
<Test />
</p>
<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
Learn React
</a>
</header>
<Eingabefelder label="test" placeholder="password" />
<p className="from-green-50">tets</p>
</div>
);
}
+27
View File
@@ -0,0 +1,27 @@
import React, { useState } from "react";
function Eingabefeld(props) {
const [usepollName, setPollName] = useState("");
return (
<div>
<label>{props.label}</label>
<input
className="form-control
block
w-220
h-35
px-3
py-1.5
text-base
font-normal
border border-solid border-gray-300
rounded
focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none"
onChange={(e) => setPollName(e.target.value)}
value={usepollName}
placeholder={props.placeholder}
/>
</div>
);
}
export default Eingabefeld;