import { ReactNode } from "react";
import { IconContext } from "react-icons/lib";

interface IconBaseProps {
	children: ReactNode;
}
/**
 * IconBase Component
 *
 * This component is a wrapper for the react-icons library.
 * It provides a common interface for all icons and applies a consistent style to them.
 * The style is defined by the IconContext.Provider, which is set to give all icons a height and width of 6.
 *
 * @component
 * @param {ReactNode} children - The icons that are passed as children to the IconBase component.
 * @returns {JSX.Element} A React component that renders the icons within the context of the IconContext.Provider.
 */
const IconBase: React.FC<IconBaseProps> = ({ children }) => {
	return (
		<IconContext.Provider
			value={{
				className: "h-6 w-6",
			}}
		>
			{children}
		</IconContext.Provider>
	);
};

export default IconBase;
