You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
576 B

import React, { forwardRef } from 'react';
import classNames from 'classnames';
export type IconWrapperProps = {
prefixCls: string;
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
};
const IconWrapper = forwardRef<HTMLSpanElement, IconWrapperProps>((props, ref) => {
const { className, style, children, prefixCls } = props;
const iconWrapperCls = classNames(`${prefixCls}-icon`, className);
return (
<span ref={ref} className={iconWrapperCls} style={style}>
{children}
</span>
);
});
export default IconWrapper;