import { useState } from 'react';
function App() {
const handleSubmit = () => {
console.log("メール:", email);
console.log("パスワード:", password);
};
return (
<div style={{ padding: '20px', maxWidth: '400px', margin: '0 auto' }}>
<h2>ログインフォーム</h2>
<div style={{ marginTop: '20px' }}>
<label style={{ display: 'block', marginBottom: '5px' }}>
メールアドレス
</label>
{}
<input
type="email"
style={{
width: '100%',
padding: '10px',
fontSize: '16px',
border: '1px solid #ccc',
borderRadius: '4px'
}}
/>
</div>
<div style={{ marginTop: '15px' }}>
<label style={{ display: 'block', marginBottom: '5px' }}>
パスワード
</label>
{}
<input
type="password"
style={{
width: '100%',
padding: '10px',
fontSize: '16px',
border: '1px solid #ccc',
borderRadius: '4px'
}}
/>
</div>
<button
onClick={handleSubmit}
style={{
marginTop: '20px',
padding: '10px 30px',
fontSize: '16px',
backgroundColor: '#007bff',
color: 'white',
border: 'none',
borderRadius: '4px',
cursor: 'pointer'
}}
>
送信
</button>
{}
<div style={{ marginTop: '20px', padding: '15px', backgroundColor: '#f8f9fa', borderRadius: '4px' }}>
<h3>入力内容:</h3>
<p>メール: </p>
<p>パスワード: </p>
</div>
</div>
);
}
export default App;