Debian Codegraph @

node/@patternfly/react-icons/dist/js/createIcon.d.ts

raw
1 import { type ComponentClass } from 'react';
2 export interface SVGPathObject {
3 path: string;
4 className?: string;
5 }
6 /** Icon data format */
7 export interface IconData {
8 name?: string;
9 width: number;
10 height: number;
11 xOffset?: number;
12 yOffset?: number;
13 svgClassName?: string;
14 svgPathData?: string | SVGPathObject[];
15 }
16 /** Public API props */
17 export interface IconDefinition {
18 name?: string;
19 width: number;
20 height: number;
21 xOffset?: number;
22 yOffset?: number;
23 svgPath?: string | SVGPathObject[];
24 svgClassName?: string;
25 rhUiIcon?: IconData | null;
26 }
27 /** Additional svg props */
28 export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'ref'> {
29 title?: string;
30 className?: string;
31 /** Indicates the icon should render using alternate svg data for the unified theme */
32 set?: 'default' | 'rh-ui';
33 /** Indicates the icon should render without its default styling specified in its IconDefinition.svgClassName. */
34 noDefaultStyle?: boolean;
35 }
36 /** Public API for creating icons. Will be maintained up to breaking releases. */
37 export declare function createIcon(props: IconDefinition): ComponentClass<SVGIconProps>;
38 //# sourceMappingURL=createIcon.d.ts.map