Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Switch Close Button from PropType to Flow Props (#4166)
Browse files Browse the repository at this point in the history
  • Loading branch information
borisstgermain authored and codehag committed Sep 26, 2017
1 parent f390fcc commit 823ec4c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/components/shared/Button/Close.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// @flow
import React, { PropTypes } from "react";
import React from "react";
import Svg from "../Svg";
import "./Close.css";

type CloseButtonType = {
handleClick: any,
type Props = {
handleClick: Function,
buttonClass?: string,
tooltip?: string
};

function CloseButton({ handleClick, buttonClass, tooltip }: CloseButtonType) {
function CloseButton({ handleClick, buttonClass, tooltip }: Props) {
return (
<div
className={buttonClass ? `close-btn ${buttonClass}` : "close-btn"}
Expand All @@ -21,8 +21,4 @@ function CloseButton({ handleClick, buttonClass, tooltip }: CloseButtonType) {
);
}

CloseButton.propTypes = {
handleClick: PropTypes.func.isRequired
};

export default CloseButton;

0 comments on commit 823ec4c

Please sign in to comment.