diff --git a/scm-ui/src/components/AddButton.js b/scm-ui/src/components/AddButton.js new file mode 100644 index 0000000000..6668aa32d1 --- /dev/null +++ b/scm-ui/src/components/AddButton.js @@ -0,0 +1,11 @@ +//@flow +import React from "react"; +import Button, { type ButtonProps } from "./Button"; + +class AddButton extends React.Component { + render() { + return ); + }; + + render() { + const { link } = this.props; + if (link) { + return {this.renderButton()}; + } else { + return this.renderButton(); + } } } diff --git a/scm-ui/src/components/SubmitButton.js b/scm-ui/src/components/SubmitButton.js index e022d74155..26188cb1d0 100644 --- a/scm-ui/src/components/SubmitButton.js +++ b/scm-ui/src/components/SubmitButton.js @@ -1,41 +1,10 @@ //@flow import React from "react"; -import classNames from "classnames"; +import Button, { type ButtonProps } from "./Button"; -type Props = { - value: string, - disabled?: boolean, - isLoading?: boolean, - large?: boolean, - fullWidth?: boolean -}; - -class SubmitButton extends React.Component { +class SubmitButton extends React.Component { render() { - const { value, large, fullWidth, isLoading, disabled } = this.props; - - const largeClass = large ? "is-large" : ""; - const fullWidthClass = fullWidth ? "is-fullwidth" : ""; - const loadingClass = isLoading ? "is-loading" : ""; - - return ( -
-
- -
-
- ); + return