@gulibs/vgrove-ui
Version:
VGrove UI component library built with HeroUI and React
38 lines • 1.36 kB
TypeScript
import type { ButtonProps } from '@heroui/react';
import type { Collapseable } from '../types';
interface LanguageOption {
code: string;
name: string;
flag?: string;
}
export type I18nSwitchColor = ButtonProps['color'];
export type I18nSwitchSize = ButtonProps['size'];
export type I18nSwitchVariant = ButtonProps['variant'];
export type I18nSwitchRadius = ButtonProps['radius'];
export interface I18nSwitchProps extends Collapseable {
color?: I18nSwitchColor;
/** 是否显示国旗 */
showFlag?: boolean;
/** 按钮样式变体 */
variant?: I18nSwitchVariant;
/** 按钮大小 */
size?: I18nSwitchSize;
/** 按钮圆角 */
radius?: I18nSwitchRadius;
/** 自定义语言选项 */
languages?: LanguageOption[];
/** 自定义类名 */
className?: string;
/** 强制显示 */
forceShow?: boolean;
/** aria-label属性,用于屏幕阅读器 */
'aria-label'?: string;
}
/**
* 国际化语言切换组件
* 兼容 @gulibs/vgrove-i18n 生成的资源
*/
export declare function I18nSwitch({ color, isCollapsed, showFlag, variant, size, radius, languages, className, forceShow, 'aria-label': ariaLabel, }: I18nSwitchProps): import("react/jsx-runtime").JSX.Element | null;
export declare const LanguageSwitch: typeof I18nSwitch;
export {};
//# sourceMappingURL=I18nSwitch.d.ts.map