From 159ced279be3cf8588e29c30e082886c17082368 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Fri, 4 Aug 2017 12:27:10 -0500 Subject: [PATCH] Update CloseButton to use jsx --- src/components/shared/Button/Close.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/shared/Button/Close.js b/src/components/shared/Button/Close.js index a41dba2508..05688e3432 100644 --- a/src/components/shared/Button/Close.js +++ b/src/components/shared/Button/Close.js @@ -1,5 +1,5 @@ // @flow -import { DOM as dom, PropTypes } from "react"; +import React, { PropTypes } from "react"; import Svg from "../Svg"; import "./Close.css"; @@ -10,16 +10,18 @@ type CloseButtonType = { }; function CloseButton({ handleClick, buttonClass, tooltip }: CloseButtonType) { - return dom.div( - { - className: buttonClass ? `close-btn ${buttonClass}` : "close-btn", - onClick: handleClick, - title: tooltip - }, - Svg("close") + return ( +
+ {Svg("close")} +
); } +CloseButton.displayName = "CloseButton"; CloseButton.propTypes = { handleClick: PropTypes.func.isRequired };