import { ReactNode } from "react"; import { ExtraIcons } from "./icons.js"; export declare const useExtraIcons: () => ExtraIcons; /** Allow usage of app-specific icons in icon components from the library. Works by using the React context API, so you must wrap the app in `ExtraIconsProvider`. It doesn't have to be the outermost component, but must be outside any icon-rendering components. You must also tell the type system about the new icons, through declaration merging of the `ExtraIcons` interface. ```tsx // App.tsx or equivalent import { defineIcons } from "@moller/design-system" const appIcons = defineIcons({ someAppIcon: { // Note: We currently can't check that you have defined the necessary icon variant(s) // for your app. An error will be shown in the console at runtime if a required icon // variant is requested but can't be found. Ensure you add the variants you need -- // by default `"filled"`, unless overridden by `` filled: some_svg, // options can be defined to adjust how the icon is rendered, but is not required. options: { fit: "width", scale: 0.8 } }, }); type AppIcons = typeof appIcons; declare module "@moller/design-system" { // eslint-disable-next-line @typescript-eslint/no-empty-interface interface ExtraIcons extends AppIcons {} } export const App = () => ( // ...render the rest of the app... ); // SomeComponent.tsx export const SomeComponent = () => (
An icon from the library: App-specific icon:
); ``` */ export declare const ExtraIconsProvider: React.FC<{ icons: ExtraIcons; children: ReactNode; }>; //# sourceMappingURL=ExtraIconsProvider.d.ts.map