phosphor-solid
Version:
A clean and friendly icon family for Solid-js
24 lines (18 loc) • 603 B
text/typescript
import { createContext, JSX, Component } from "solid-js";
export interface IconProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
color?: string;
size?: string | number;
weight?: "thin" | "light" | "regular" | "bold" | "fill" | "duotone";
mirrored?: boolean;
}
export type Icon = Component<IconProps>;
export type IconContextProps = Required<
Pick<IconProps, "color" | "size" | "weight" | "mirrored">
> &
JSX.SvgSVGAttributes<SVGSVGElement>;
export const IconContext = createContext<IconContextProps>({
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
});