UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

28 lines (27 loc) 2 kB
import { icons as iconTokens } from "../../tokens"; interface IconsMap { [name: string]: string | undefined; } export declare const BUNDLED_ICONS: IconsMap; export type IconSources = keyof typeof iconTokens.icons; export declare const iconColors: ("surface" | "surfaceBright" | "surfaceContainer" | "surfaceContainerVariant" | "outline" | "outlineVariant" | "onSurface" | "onSurfaceVariant" | "onSurfaceContainerVariant" | "disabled" | "onSurfaceDisabled" | "primary" | "onPrimary" | "primaryContainer" | "onPrimaryContainer" | "secondary" | "onSecondary" | "secondaryContainer" | "onSecondaryContainer" | "onSecondaryContainerVariant" | "tertiary" | "onTertiary" | "outlineTertiary" | "tertiaryContainer" | "onTertiaryContainer" | "onTertiaryContainerVariant" | "success" | "onSuccess" | "successContainer" | "onSuccessContainer" | "error" | "onError" | "errorContainer" | "onErrorContainer" | "warning" | "onWarning" | "warningContainer" | "onWarningContainer" | "neutral" | "onNeutral" | "connect" | "onConnect" | "keyExchange" | "onKeyExchange" | "seasonLowest" | "onSeasonLowest" | "seasonMedium" | "onSeasonMedium" | "seasonHigh" | "onSeasonHigh" | "seasonHighest" | "onSeasonHighest" | "business" | "businessVariant" | "onBusiness" | "onBusinessVariant" | "businessContainer" | "onBusinessContainer" | "hover" | "focus" | "press" | "drag" | "scrim" | "surfaceFixed")[]; export type IconColorsType = (typeof iconColors)[number]; export interface IconProps { source: IconSources; /** * Available colors * @default base */ color?: IconColorsType; /** * Available size in px * @default 24 */ size?: 16 | 20 | 24 | 32; contained?: boolean; className?: string; } export declare const isIconSource: (source: string) => source is IconSources; export declare const Icon: ({ source, color, size, contained, className, }: IconProps) => import("react/jsx-runtime").JSX.Element; export * from "./__generated__/index"; export default Icon;