mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
upgrade deps
This commit is contained in:
17 files changed
+52
-72
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import classNames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
||||
export default function IconComponent(props: { name: string, className?: string } & React.HTMLAttributes<HTMLSpanElement>) {
|
||||
const {
|
||||
name,
|
||||
className,
|
||||
...rest
|
||||
} = props;
|
||||
const cn = classNames(className, `icon icon-${name}`);
|
||||
return (
|
||||
<span {...rest} className={cn} />
|
||||
);
|
||||
}
|
||||
|
||||
IconComponent.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
className: PropTypes.string,
|
||||
};
|
||||
Reference in new issue
Block a user