mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-22 01:43:07 +00:00
25 lines
575 B
TypeScript
25 lines
575 B
TypeScript
import { TextField } from "@material-ui/core";
|
|
import React, { ChangeEvent } from "react";
|
|
|
|
interface Props {
|
|
password: string | undefined;
|
|
setPassword: (password: string) => void;
|
|
}
|
|
|
|
export default function PasswordInput({ password, setPassword }: Props) {
|
|
const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
setPassword(event.target.value);
|
|
};
|
|
|
|
return (
|
|
<TextField
|
|
id="password-input"
|
|
label="Password"
|
|
variant="filled"
|
|
type="password"
|
|
onChange={handlePasswordChange}
|
|
value={password}
|
|
/>
|
|
);
|
|
}
|