Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions components/Signup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { ComponentProps, useState, type FC } from "react"

import { Input, FormControl, Button } from "smarthr-ui"

export const SignUp: FC = (props: ComponentProps<"form">) => {
return (
<form {...props}>
<FormControl title="メールアドレス">
<Input type="email" />
</FormControl>

<SignUpPassword />

<Button type="submit">
送信
</Button>
</form>
)
}

const SignUpPassword: FC = () => {
const [password, setPassword] = useState("");

return (
<div>
<Input
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
Comment on lines +26 to +30
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inputコンポーネントは必ずFormControlコンポーネントと併用して、ユーザーが何を入力すべきかを示すラベルを設定してください。FormControlと併用することで、支援技術にも入力の目的が伝達されます。パスワード入力フィールドに<FormControl title=\"パスワード\">でラップしてください。

Copilot generated this review using guidance from repository custom instructions.

{password.length < 8 && (
<p>パスワードは8文字以上にしてください</p>
)}
</div>
)
}