12345678910111213141516171819202122232425262728293031323334353637 |
- import React, { ReactHTMLElement } from "react";
- import PropTypes from "prop-types";
-
- import closeBtnPng from "./icon_quit.png";
- import closeBtn2xPng from "./icon_quit@2x.png";
-
- const ModalCloseBtn = (props: any): JSX.Element => (
- <div
- role="button"
- tabIndex={0}
- onKeyPress={() => {}}
- onClick={() => props.onClick()}
- style={{
- position: "absolute",
- cursor: "pointer",
- top: "9px",
- right: "9px",
- width: "18px",
- height: "18px",
- outline: "none"
- }}
- >
- <img
- style={{ width: "100%", height: "100%" }}
- src={closeBtnPng}
- srcSet={`${closeBtnPng} 1400w, ${closeBtn2xPng} 2800w`}
- alt="close_modal"
- />
- </div>
- );
-
- ModalCloseBtn.propTypes = {
- onClick: PropTypes.oneOfType([PropTypes.any]).isRequired
- };
-
- export default ModalCloseBtn;
|