summaryrefslogtreecommitdiff
path: root/src/components/Icon.js
diff options
context:
space:
mode:
authorHaishan <[email protected]>2020-10-31 18:18:04 +0800
committerHaishan <[email protected]>2020-11-01 17:42:52 +0800
commitff1a39d04e53b428e34d46c55ecd6689189b5443 (patch)
tree94a60abe3d28a1d729b877356bdd38d75ce655a5 /src/components/Icon.js
parente62c9165481ef12ee2310dee1c32f890b3fe4b78 (diff)
chore: run ts-migrate
Diffstat (limited to 'src/components/Icon.js')
-rw-r--r--src/components/Icon.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/components/Icon.js b/src/components/Icon.js
deleted file mode 100644
index 2ad162c..0000000
--- a/src/components/Icon.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import cx from 'clsx';
-import PropTypes from 'prop-types';
-import React from 'react';
-
-const Icon = ({ id, width = 20, height = 20, className, ...props }) => {
- const c = cx('icon', id, className);
- const href = '#' + id;
- return (
- <svg className={c} width={width} height={height} {...props}>
- <use xlinkHref={href} />
- </svg>
- );
-};
-
-Icon.propTypes = {
- id: PropTypes.string.isRequired,
- width: PropTypes.number,
- height: PropTypes.number,
- className: PropTypes.string,
-};
-
-export default React.memo(Icon);