Skip to content
Snippets Groups Projects
toolbutton.tsx 588 B
Newer Older
  • Learn to ignore specific revisions
  • import { InferType } from "prop-types";
    import React from "react";
    
    import "./toolbutton.css";
    
    
    type propTypes = {
    
        title: string;
        icon: string;
    
    };
    
    export class ToolButton extends React.PureComponent<
        propTypes,
        InferType<typeof ToolButton.stateTypes>
    > {
        static stateTypes = {};
    
        render(): React.ReactNode {
            return (
                <button
    
                    title={this.props.title}
                    // onClick={() => this.props.state.setTool(this.props.tool)}
    
                    <img src={this.props.icon} />