diff --git a/src/@types/IconProps.d.ts b/src/@types/IconProps.d.ts index 51e27c4..6d9773a 100644 --- a/src/@types/IconProps.d.ts +++ b/src/@types/IconProps.d.ts @@ -1,4 +1,7 @@ +import { CSSProperties } from "react"; + export type IconProps = { className?: string; color?: string; + style?: CSSProperties; }; diff --git a/src/BaseSvg.tsx b/src/BaseSvg.tsx index 0fef429..db1196d 100644 --- a/src/BaseSvg.tsx +++ b/src/BaseSvg.tsx @@ -6,7 +6,7 @@ type props = IconProps & { children: ReactNode; }; -export const BaseSvg = ({ children, className, color }: props) => { +export const BaseSvg = ({ children, className, color, style }: props) => { return ( { fill="none" xmlns="http://www.w3.org/2000/svg" className={`${Styles.icon} ${className}`} - style={{ fill: color }} + style={{ ...(style ?? {}), fill: color }} > {children}