// @flow
import * as React from "react";
import { FormCard, FormTextInput, StandaloneFormPage } from "../../../";
import withTouchedErrors from "../../../helpers/withTouchedErrors.react";
import defaultStrings from "./LoginPage.strings";
import type { stringTypes } from "./LoginPage.strings";
import type { FormEvents, FocusEvents } from "../../../";
type fieldTypes = {|
email?: string,
password?: string,
|};
type touchedTypes = {|
email?: boolean,
password?: boolean,
|};
type Props = {|
...FormEvents,
...FocusEvents,
+strings?: stringTypes,
+action?: string,
+method?: string,
+values?: fieldTypes,
+errors?: fieldTypes,
+touched?: touchedTypes,
|};
/**
* A login page
* Can be easily wrapped with form libraries like formik and redux-form
*/
function LoginPage(props: Props): React.Node {
const {
action,
method,
onSubmit,
onChange,
onBlur,
values,
strings = {},
errors,
imageURL,
} = props;
return (
);
}
const LoginPageWithTouchedErrors: React.ComponentType = withTouchedErrors(
["email", "password"]
)(LoginPage);
export default LoginPageWithTouchedErrors;