forked from pradel/react-responsive-modal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclose-icon.js
40 lines (37 loc) · 954 Bytes
/
close-icon.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import cx from 'classnames';
import PropTypes from 'prop-types';
const CloseIcon = ({
classes,
classNames,
styles,
closeIconSize,
closeIconSvgPath,
onClickCloseIcon,
}) => (
<button
className={cx(classes.closeButton, classNames.closeButton)}
style={styles.closeButton}
onClick={onClickCloseIcon}
>
<svg
className={cx(classes.closeIcon, classNames.closeIcon)}
style={styles.closeIcon}
xmlns="http://www.w3.org/2000/svg"
width={closeIconSize}
height={closeIconSize}
viewBox="0 0 36 36"
>
{closeIconSvgPath}
</svg>
</button>
);
CloseIcon.propTypes = {
classNames: PropTypes.object.isRequired,
styles: PropTypes.object.isRequired,
classes: PropTypes.object.isRequired,
closeIconSize: PropTypes.number.isRequired,
closeIconSvgPath: PropTypes.node.isRequired,
onClickCloseIcon: PropTypes.func.isRequired,
};
export default CloseIcon;