@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
30 lines (29 loc) • 1.16 kB
TypeScript
import { PropsOf } from "../utils/types.js";
import "../utils/index.js";
import { Svg } from "../svg/svg.js";
import "../svg/index.js";
import { BaseIcon } from "./baseIcons/types.js";
//#region src/icons/types.d.ts
/** Object defining a custom icon. */
type IconDefinition = {
/** Icon details including height, width and 'd' attribute. */
details: IconDetails;
/** Name of the icon used internally. */
name: string;
/** Old name of the icon, used for backward compatibility. */
oldName?: string;
/** Props object or array of objects passed to the path elements. */
pathProps?: React.SVGProps<SVGPathElement> | React.SVGProps<SVGPathElement>[];
/** Props object passed to the svg element. */
svgProps?: PropsOf<typeof Svg>;
};
/** Icon definition following Font Awesome standard. */
type IconDetails = [number, number, string[], string,
// unicode
string | string[]];
/** Base icons collection, which can be extended by the consumer. */
interface VuiIcons extends Record<BaseIcon, IconDefinition> {}
type VuiIcon = keyof VuiIcons;
//#endregion
export { IconDefinition, IconDetails, VuiIcon, VuiIcons };
//# sourceMappingURL=types.d.ts.map