feat: dashboard optimized on font awesome levels using symbols technique

This commit is contained in:
=
2024-05-13 13:40:59 +05:30
parent ecbdae110d
commit 0f5c1340d3
5 changed files with 143 additions and 38 deletions
@@ -0,0 +1,19 @@
import { forwardRef, HTMLAttributes } from "react";
type Props = {
symbolName: string;
} & HTMLAttributes<HTMLDivElement>;
export const FontAwesomeSymbol = forwardRef<HTMLDivElement, Props>(
({ symbolName, ...props }, ref) => {
return (
<div ref={ref} {...props}>
<svg className="w-inherit h-inherit">
<use href={`#${symbolName}`} />
</svg>
</div>
);
}
);
FontAwesomeSymbol.displayName = "FontAwesomeSymbol";
@@ -0,0 +1 @@
export { FontAwesomeSymbol } from "./FontAwesomeSymbol";