This commit is contained in:
Belén Curcio
2018-08-21 22:47:39 -03:00
parent ec5cdb5681
commit bace76decc
18 changed files with 38 additions and 78 deletions
+1
View File
@@ -12,4 +12,5 @@
.root {
width: 100%;
padding-top: calc(5 * var(--spacing-unit));
}
@@ -1,9 +1,3 @@
.root {
width: 330px;
padding-top: calc(5 * var(--spacing-unit));
}
.footer {
padding-top: var(--spacing-unit);
width: 100%;
}
@@ -32,7 +32,7 @@ const ForgotPassword: StatelessComponent<ForgotPasswordForm> = props => {
<Form onSubmit={props.onSubmit}>
{({ handleSubmit }) => (
<form autoComplete="off" onSubmit={handleSubmit}>
<Flex itemGutter direction="column" className={styles.root}>
<Flex itemGutter="double" direction="column" className={styles.root}>
<Typography variant="heading1" align="center">
Forgot Password
</Typography>
@@ -62,11 +62,9 @@ const ForgotPassword: StatelessComponent<ForgotPasswordForm> = props => {
</FormField>
)}
</Field>
<div className={styles.footer}>
<Button variant="filled" color="primary" size="large" fullWidth>
Send Email
</Button>
</div>
<Button variant="filled" color="primary" size="large" fullWidth>
Send Email
</Button>
</Flex>
</form>
)}
@@ -1,9 +1,3 @@
.root {
width: 330px;
padding-top: calc(5 * var(--spacing-unit));
}
.footer {
padding-top: var(--spacing-unit);
width: 100%;
}
@@ -35,7 +35,7 @@ const ResetPassword: StatelessComponent<ResetPasswordForm> = props => {
<Form onSubmit={props.onSubmit}>
{({ handleSubmit }) => (
<form autoComplete="off" onSubmit={handleSubmit}>
<Flex itemGutter direction="column" className={styles.root}>
<Flex itemGutter="double" direction="column" className={styles.root}>
<Typography variant="heading1" align="center">
Reset Password
</Typography>
@@ -96,11 +96,9 @@ const ResetPassword: StatelessComponent<ResetPasswordForm> = props => {
</FormField>
)}
</Field>
<div className={styles.footer}>
<Button variant="filled" color="primary" size="large" fullWidth>
Reset Password
</Button>
</div>
<Button variant="filled" color="primary" size="large" fullWidth>
Reset Password
</Button>
</Flex>
</form>
)}
@@ -1,6 +1,5 @@
.root {
width: 330px;
padding-top: calc(5 * var(--spacing-unit));
}
.forgotPassword {
+1 -1
View File
@@ -38,7 +38,7 @@ const SignIn: StatelessComponent<SignInForm> = props => {
<Form onSubmit={props.onSubmit}>
{({ handleSubmit, submitting }) => (
<form autoComplete="off" onSubmit={handleSubmit}>
<Flex itemGutter direction="column" className={styles.root}>
<Flex itemGutter="double" direction="column" className={styles.root}>
<Typography variant="heading1" align="center">
Sign in to join the conversation
</Typography>
@@ -2,7 +2,6 @@
width: 330px;
}
.footer,
.subFooter {
padding-top: var(--spacing-unit);
width: 100%;
+1 -1
View File
@@ -42,7 +42,7 @@ const SignUp: StatelessComponent<SignUpForm> = props => {
<Form onSubmit={props.onSubmit}>
{({ handleSubmit, submitting }) => (
<form autoComplete="off" onSubmit={handleSubmit}>
<Flex itemGutter direction="column" className={styles.root}>
<Flex itemGutter="double" direction="column" className={styles.root}>
<Flex direction="column">
<Typography variant="heading1" align="center">
Sign up to join the conversation
@@ -17,7 +17,7 @@ export async function commit(
window.close();
} catch (err) {
postMessage.send("authError", err.toString(), window.opener);
throw Error(err.message);
throw err;
}
}
@@ -17,7 +17,7 @@ export async function commit(
window.close();
} catch (err) {
postMessage.send("authError", err.toString(), window.opener);
throw Error(err.toString());
throw err;
}
}
@@ -1,4 +0,0 @@
export interface ExceptionError {
message: string;
stack: string;
}
@@ -2,6 +2,5 @@ export { default as NetworkError } from "./networkError";
export { default as UnknownServerError } from "./unknownServerError";
export { default as BadUserInputError } from "./badUserInputError";
export { default as GraphQLError } from "./graphqlError";
export { default as ExceptionError } from "./exceptionError";
export * from "./graphqlError";
+2
View File
@@ -17,6 +17,8 @@ const buildOptions = (inputOptions: RequestInit = {}) => {
return options;
};
// TODO (bc): Wrap response errors into error objects once server errors have been defined
const handleResp = async (res: Response) => {
if (res.status === 404) {
const response = await res.text();
@@ -1,14 +0,0 @@
.root {
padding: var(--spacing-unit);
color: var(--palette-text-primary);
}
.text {
padding-right: calc(0.5 * var(--spacing-unit));
line-height: 1px;
}
.horizontalSeparator {
font-size: 1.3em;
color: var(--palette-text-primary);
}
@@ -1,8 +1,3 @@
.root {
display: block;
text-align: center;
}
.spinner {
animation: rotator 1.4s linear infinite;
}
@@ -17,28 +17,26 @@ export interface SpinnerProps {
const Spinner: StatelessComponent<SpinnerProps> = props => {
const { className, classes } = props;
const rootClassName = cn(classes.root, className);
const rootClassName = cn(classes.spinner, className);
return (
<div className={rootClassName}>
<svg
className={styles.spinner}
width="40px"
height="40px"
viewBox="0 0 66 66"
xmlns="http://www.w3.org/2000/svg"
>
<circle
className={styles.path}
fill="none"
strokeWidth="6"
strokeLinecap="round"
cx="33"
cy="33"
r="30"
/>
</svg>
</div>
<svg
className={rootClassName}
width="40px"
height="40px"
viewBox="0 0 66 66"
xmlns="http://www.w3.org/2000/svg"
>
<circle
className={styles.path}
fill="none"
strokeWidth="6"
strokeLinecap="round"
cx="33"
cy="33"
r="30"
/>
</svg>
);
};
@@ -1,5 +1,5 @@
import cn from "classnames";
import React from "react";
import React, { ChangeEvent, EventHandler } from "react";
import { StatelessComponent } from "react";
import { withStyles } from "talk-ui/hocs";
import * as styles from "./TextField.css";
@@ -42,13 +42,13 @@ export interface TextFieldProps {
*/
name?: string;
/**
* type
* type: Here we only allow text type values
*/
type?: string;
type?: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
/**
* onChange
*/
onChange?: <T>(event: any) => void;
onChange?: EventHandler<ChangeEvent<HTMLInputElement>>;
}
const TextField: StatelessComponent<TextFieldProps> = props => {
@@ -85,6 +85,7 @@ const TextField: StatelessComponent<TextFieldProps> = props => {
TextField.defaultProps = {
color: "regular",
placeholder: "",
type: "text",
};
const enhanced = withStyles(styles)(TextField);