2019-09-09 09:08:54 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { Button, MaybeElement } from "@blueprintjs/core";
|
|
|
|
|
import { TextComponentProps } from "./TextComponent";
|
|
|
|
|
import { Container } from "./ContainerComponent";
|
2019-02-10 13:06:05 +00:00
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
class ButtonComponent extends React.Component<ButtonComponentProps> {
|
2019-02-10 13:06:05 +00:00
|
|
|
render() {
|
2019-09-19 22:25:37 +00:00
|
|
|
console.log("button props", this.props);
|
2019-03-19 14:05:48 +00:00
|
|
|
return (
|
2019-03-21 12:10:32 +00:00
|
|
|
<Container {...this.props}>
|
2019-09-17 10:11:50 +00:00
|
|
|
<Button icon={this.props.icon} onClick={this.props.onClick}>
|
|
|
|
|
{this.props.text}
|
|
|
|
|
</Button>
|
2019-03-21 12:10:32 +00:00
|
|
|
</Container>
|
2019-09-09 09:08:54 +00:00
|
|
|
);
|
2019-02-10 13:06:05 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
interface ButtonComponentProps extends TextComponentProps {
|
|
|
|
|
icon?: MaybeElement;
|
2019-09-17 10:11:50 +00:00
|
|
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
2019-02-10 13:06:05 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-09 09:08:54 +00:00
|
|
|
export default ButtonComponent;
|