import React from 'react'; import TextField from "@material-ui/core/TextField"; const TextInput = (props) => { return ( TextField className={textStyle} fullWidth={props.fullWidth} label={props.label} margin="dense" multiline={props.multiline} required={props.required} rows={props.rows} value={props.value} type={props.type} onChange={props.onChange} /> ); }; export default TextInput
TextInput fullWidth={true} label={"ユーザー名"} multiline={false} required={true} rows={1} value={username} type={"text"} onChange={inputUsername} /> TextInput fullWidth={true} label={"メールアドレス"} multiline={false} required={true} rows={1} value={email} type={"email"} onChange={inputEmail} /> TextInput fullWidth={true} label={"パスワード(半角英数字で6文字以上)"} multiline={false} required={true} rows={1} value={password} type={"password"} onChange={inputPassword} /> TextInput fullWidth={true} label={"パスワードの再確認"} multiline={false} required={true} rows={1} value={confirmPassword} type={"password"} onChange={inputConfirmPassword} />