@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
51 lines (50 loc) • 2.41 kB
TypeScript
import { ThemeProps } from "../../core/system/index.types.js";
import { GenericsComponent, HTMLStyledProps } from "../../core/components/index.types.js";
import "../../core/index.js";
import { HTMLMotionProps } from "../motion/index.types.js";
import { SegmentedControlStyle } from "./segmented-control.style.js";
import { UseSegmentedControlItemProps, UseSegmentedControlProps } from "./use-segmented-control.js";
import * as react2684 from "react";
import { ReactElement, ReactNode } from "react";
//#region src/components/segmented-control/segmented-control.d.ts
interface SegmentedControlItem extends SegmentedControlItemProps {
label?: ReactNode;
}
interface SegmentedControlRootProps<Y extends string = string> extends Omit<HTMLStyledProps, "defaultValue" | "onChange">, ThemeProps<SegmentedControlStyle>, Omit<UseSegmentedControlProps<Y>, "orientation"> {
/**
* If provided, generate segmented control buttons but based on items.
*
* @default []
*/
items?: SegmentedControlItem[];
/**
* Props for the indicator component.
*/
indicatorProps?: SegmentedControlIndicatorProps;
/**
* Props for the item component.
*/
itemProps?: SegmentedControlItemProps;
}
declare const SegmentedControlPropsContext: react2684.Context<Partial<SegmentedControlRootProps<string>> | undefined>, useSegmentedControlPropsContext: () => Partial<SegmentedControlRootProps<string>> | undefined;
/**
* `SegmentedControl` is a component used for allowing users to select one option from multiple choices.
*
* @see https://yamada-ui.com/docs/components/segmented-control
*/
declare const SegmentedControlRoot: GenericsComponent<{
<Y extends string = string>(props: SegmentedControlRootProps<Y>): ReactElement;
}>;
interface SegmentedControlItemProps<Y extends string = string> extends HTMLStyledProps<"label">, UseSegmentedControlItemProps<Y> {
/**
* Props for the indicator component.
*/
indicatorProps?: SegmentedControlIndicatorProps;
}
declare const SegmentedControlItem: GenericsComponent<{
<Y extends string = string>(props: SegmentedControlItemProps<Y>): ReactElement;
}>;
interface SegmentedControlIndicatorProps extends HTMLMotionProps {}
//#endregion
export { SegmentedControlItem, SegmentedControlItemProps, SegmentedControlPropsContext, SegmentedControlRoot, SegmentedControlRootProps, useSegmentedControlPropsContext };
//# sourceMappingURL=segmented-control.d.ts.map