@tiller-ds/icons
Version:
Icons module of Tiller Design System
34 lines (33 loc) • 1.32 kB
TypeScript
import * as React from "react";
import { IconVariant as ThemeIconVariant } from "@tiller-ds/theme";
import iconTypes from "./iconTypes";
export declare type IconType = typeof iconTypes[number] | undefined;
export declare type IconVariant = ThemeIconVariant;
export declare type IconProps = {
/**
* The size of the icon (determined by a number or 'full' keyword)
*/
size?: number;
/**
* Shown icon (selected by entered name from the list
* (all possible icons are shown on https://phosphoricons.com/)
*/
type: IconType;
/**
* Determines whether the icon is solid (filled) or outlined
*/
variant?: IconVariant;
/**
* A unique identifier for testing purposes.
* This identifier can be used in testing frameworks like Jest or Cypress to locate specific elements for testing.
* It helps ensure that UI components are behaving as expected across different scenarios.
* @type {string}
* @example
* // Usage:
* <MyComponent data-testid="my-component" />
* // In tests:
* getByTestId('my-component');
*/
"data-testid"?: string;
} & Omit<React.SVGProps<SVGSVGElement>, "color">;
export default function Icon({ variant, type, className, size, ...props }: IconProps): JSX.Element;