Newer
Older
CrypticOreWallet / src / shared-components / icon-button / IconButton.tsx
@Drew Lemmy Drew Lemmy on 30 Sep 2020 506 bytes feat: start of add wallet dialog
import React, { PropsWithChildren } from "react";

import Button, { ButtonProps } from "react-bootstrap/Button";

import "./IconButton.scss";

export interface Props extends ButtonProps {
  icon?: string;
  openDialog?: () => void;
}

export const IconButton: React.FC<Props> = ({ openDialog, ...props }: PropsWithChildren<Props>) => {
  return <Button as="a" onClick={openDialog} {...props}>
    {props.icon && <span className={`btn-icon icon-${props.icon}`}></span>}
    {props.children}
  </Button>;
};