@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
48 lines (45 loc) • 1.4 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ContextValue } from 'react-aria-components';
import { ProviderProps } from '../../lib/types.js';
import { IconProps } from './types.js';
declare const IconContext: react.Context<ContextValue<IconProps, HTMLSpanElement>>;
declare function IconProvider({ children, ...props }: ProviderProps<IconProps>): react_jsx_runtime.JSX.Element;
declare namespace IconProvider {
var displayName: string;
}
/**
* Icon - A wrapper component for displaying SVG icons with consistent sizing
*
* Provides a standardized container for SVG icons with built-in size variants and
* proper accessibility support. Works seamlessly with the Accelint icon library
* and supports custom SVG elements with consistent styling and alignment.
*
* @example
* // Basic icon usage
* <Icon>
* <Settings />
* </Icon>
*
* @example
* // Icon with different sizes
* <Icon size="small">
* <User />
* </Icon>
* <Icon size="large">
* <Dashboard />
* </Icon>
*
* @example
* // Icon in button context (automatically inherits sizing)
* <Button>
* <Icon><Plus /></Icon>
* Add Item
* </Button>
*/
declare function Icon({ ref, ...props }: IconProps): react_jsx_runtime.JSX.Element;
declare namespace Icon {
var displayName: string;
var Provider: typeof IconProvider;
}
export { Icon, IconContext };