Newer
Older
CrypticOreWallet / src / layouts / dialogs / utils / CloseButton.tsx
@Drew Lemmy Drew Lemmy on 8 Sep 2020 451 bytes chore: replace type aliases with interfaces
import React from "react";

import Button from "react-bootstrap/Button";

interface Props {
  handleClose: () => void;
  alignRight?: boolean;
}

export const CloseButton: React.FC<Props> = ({ handleClose, alignRight }: Props) => (
  <Button 
    variant="secondary" 
    style={{ 
      marginRight: typeof alignRight === "undefined" || alignRight ? "auto" : "inherit" 
    }} 
    onClick={handleClose}
    tabIndex={1}
  >
    Close
  </Button>
);