UNPKG

@solar-icons/react

Version:
25 lines (24 loc) 1.15 kB
import type { ReactNode } from 'react'; import React from 'react'; import type { SolarContextType, SolarProviderProps } from './types'; /** * SolarProvider component is a React functional component that supplies * the SolarContext to its child components. It manages and provides * default properties for icon components, allowing consistent icon * styling across the application. * @param props - The props object. * @param [props.value] - The initial icon properties. * @param [props.svgProps] - The initial SVG properties. * @param props.children - The child components that will have access to the context. * @returns The context provider that wraps children components, providing icon customization capabilities. */ export declare const SolarProvider: React.FC<SolarProviderProps & { children: ReactNode; }>; /** * useSolar hook allows access to the current icon context. * This hook can be used in any component that needs to read or modify * the default icon properties provided by the SolarProvider. * @returns The current context value for the icon properties. */ export declare const useSolar: () => SolarContextType;