info icons

This commit is contained in:
ari committed 2021-12-16 16:58:55 -05:00
1 parent f759a7c8d5
commit 997c793c36
3 files changed
+24 -9

No files matched your search

+4 -4
View File
@@ -1,5 +1,5 @@
import { createAppUseStyles } from 'styles/theme';
import { AnchorHTMLAttributes, FC } from "react";
import { AnchorHTMLAttributes, FC, SVGProps } from "react";
export type IconStyleProps = {
@@ -23,9 +23,9 @@ export const useIconStyles = createAppUseStyles<IconStyleProps>(theme => ({
}))
export type IconBaseProps = AnchorHTMLAttributes<HTMLAnchorElement> & IconStyleProps;
export const IconBase: FC<IconBaseProps & { viewBox: string }> = ({
export const IconBase: FC<IconBaseProps & { svgProps: SVGProps<SVGSVGElement> }> = ({
children,
viewBox,
svgProps = {},
size = 1,
color,
units,
@@ -34,7 +34,7 @@ export const IconBase: FC<IconBaseProps & { viewBox: string }> = ({
}) => {
const { classes } = useIconStyles({ size, color, units, });
return <a className={`${classes.icon} ${className}`} {...props}>
<svg className={classes.svg} version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox={viewBox}>
<svg className={classes.svg} version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" {...svgProps}>
<g>
{children}
</g>