uikit/dist/remote-ui-segmented-selector.d.ts
Mohamadzadeh 307d178ed3
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Has been skipped
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Has been skipped
add TabSelector and SegmentedSelector
2026-11-21 11:19:33 +03:30

41 lines
1.4 KiB
TypeScript

import type { CSSProperties, ElementType, ReactElement, ReactNode } from "react";
export type SegmentedSelectorItem<Value = string | number> = {
value: Value;
title?: string;
label?: string;
icon?: ReactNode | ElementType;
tooltip?: string;
isDisabled?: boolean;
};
export type RemoteSegmentedSelectorProps<Value = string | number> = {
items?: SegmentedSelectorItem<Value>[];
selectionMode?: "options" | "tabs";
showTooltip?: boolean;
fullWidth?: boolean;
mode?: "icon" | "text";
value?: Value;
onChange?: (value: Value) => void;
isDisabled?: boolean;
compact?: boolean;
/** Allows wrapping an option with a React element. Parent context is not inherited by the remote React root. */
renderItem?: (element: ReactElement, item: SegmentedSelectorItem<Value>, index: number) => ReactNode;
defaultValue?: Value;
ariaLabel?: string;
className?: string;
dir?: "rtl" | "ltr" | "auto";
style?: CSSProperties;
w?: string | number | { base?: string | number; lg?: string | number };
h?: string | number | { base?: string | number; lg?: string | number };
minW?: string | number;
maxW?: string | number;
minH?: string | number;
maxH?: string | number;
bg?: string;
gap?: string | number;
};
export declare function SegmentedSelector<Value = string | number>(props: RemoteSegmentedSelectorProps<Value>): any;
export default SegmentedSelector;