import Button from "@material-ui/core/Button"; import { makeStyles } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; import Form from "@saleor/components/Form"; import FormSpacer from "@saleor/components/FormSpacer"; import { commonMessages } from "@saleor/intl"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; const useStyles = makeStyles( theme => ({ errorText: { color: theme.palette.error.contrastText }, panel: { background: theme.palette.error.main, borderRadius: theme.spacing(), marginBottom: theme.spacing(3), padding: theme.spacing(1.5) }, submit: { width: "100%" } }), { name: "ResetPasswordPage" } ); export interface ResetPasswordPageFormData { email: string; } export interface ResetPasswordPageProps { disabled: boolean; error: string; onSubmit: (data: ResetPasswordPageFormData) => void; } const ResetPasswordPage: React.FC = props => { const { disabled, error, onSubmit } = props; const classes = useStyles(props); const intl = useIntl(); return (
{({ change: handleChange, data, submit: handleSubmit }) => ( <> {!!error && (
{error}
)} )} ); }; ResetPasswordPage.displayName = "ResetPasswordPage"; export default ResetPasswordPage;