mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 01:15:44 +01:00
43 lines
931 B
JavaScript
43 lines
931 B
JavaScript
//@flow
|
|
import React from "react";
|
|
import classNames from "classnames";
|
|
|
|
type Props = {
|
|
value: string,
|
|
disabled?: boolean,
|
|
isLoading?: boolean,
|
|
large?: boolean,
|
|
fullWidth?: boolean
|
|
};
|
|
|
|
class SubmitButton extends React.Component<Props> {
|
|
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 (
|
|
<div className="field">
|
|
<div className="control">
|
|
<button
|
|
disabled={disabled}
|
|
className={classNames(
|
|
"button",
|
|
"is-link",
|
|
largeClass,
|
|
fullWidthClass,
|
|
loadingClass
|
|
)}
|
|
>
|
|
{value}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default SubmitButton;
|