UNPKG

@kopexa/sight

Version:

Kopexa Sight Design System — React component library for GRC applications

26 lines (23 loc) 1.19 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { FlagIconVariantProps } from '@kopexa/theme'; type FlagIconProps = FlagIconVariantProps & { /** ISO 3166-1 alpha-2 or alpha-3 code (any case), e.g. "DE" or "DEU". */ code: string; /** Show a tooltip with the localized country name on hover. */ tooltip?: boolean; /** Locale for the name / accessible label. Defaults to the app locale. */ locale?: string; /** Accessible label override (defaults to the localized country name). */ "aria-label"?: string; /** Render purely decorative (no `img` role / label, e.g. next to a name). */ "aria-hidden"?: boolean; className?: string; }; /** * A single country flag rendered as an inline SVG (`country-flag-icons`) — * fully self-contained, no global CSS to wire up. Accepts alpha-2 or alpha-3 * and normalizes internally; the accessible label and optional tooltip use the * localized country name (`Intl.DisplayNames`). */ declare function FlagIcon({ code, size, tooltip, locale, className, "aria-label": ariaLabel, "aria-hidden": ariaHidden, }: FlagIconProps): react_jsx_runtime.JSX.Element; export { FlagIcon, type FlagIconProps };