Merged changes

This commit is contained in:
Philipp Czora
2019-02-19 15:58:53 +01:00
4 changed files with 44 additions and 7 deletions

View File

@@ -2,8 +2,8 @@
import React from "react";
import injectSheet from "react-jss";
import { type ButtonProps } from "./Button";
import SubmitButton from "./SubmitButton";
import classNames from "classnames";
import Button from "./Button";
const styles = {
spacing: {
@@ -19,7 +19,7 @@ class CreateButton extends React.Component<ButtonProps> {
const { classes } = this.props;
return (
<div className={classNames("has-text-centered", classes.spacing)}>
<SubmitButton {...this.props} />
<Button color="primary" {...this.props} />
</div>
);
}

View File

@@ -4,7 +4,16 @@ import Button, { type ButtonProps } from "./Button";
class SubmitButton extends React.Component<ButtonProps> {
render() {
return <Button type="submit" color="primary" {...this.props} />;
return (
<Button
type="submit"
color="primary"
{...this.props}
action={() => {
window.scrollTo(0, 0);
}}
/>
);
}
}