UNPKG

@fluentui/react-northstar

Version:
68 lines (67 loc) 3.33 kB
import * as PropTypes from 'prop-types'; import * as React from 'react'; import { Accessibility, TabBehaviorProps } from '@fluentui/accessibility'; import { UIComponentProps, ContentComponentProps, ChildrenComponentProps } from '../../utils'; import { ShorthandValue, ComponentEventHandler, FluentComponentStaticProps } from '../../types'; import { BoxProps } from '../Box/Box'; export interface CarouselNavigationItemSlotClassNames { indicator: string; content: string; } export interface CarouselNavigationItemProps extends UIComponentProps, ChildrenComponentProps, ContentComponentProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<TabBehaviorProps>; /** A menu item can be active. */ active?: boolean; /** Indicator for the Carousel Navigation Item. */ indicator?: ShorthandValue<BoxProps>; /** A Carousel Navigation may have just icons. */ iconOnly?: boolean; /** CarouselNavigationIntem index inside CarouselNavigation. */ index?: number; /** * Called on click. * * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props. */ onClick?: ComponentEventHandler<CarouselNavigationItemProps>; /** The carousel navigation item can have primary type. */ primary?: boolean; /** The carousel navigation item can have secondary type. */ secondary?: boolean; /** A vertical carousel navigation displays elements vertically. */ vertical?: boolean; thumbnails?: boolean; /** A navigation may be clickable */ disableClickableNav?: boolean; } export declare type CarouselNavigationItemStylesProps = Required<Pick<CarouselNavigationItemProps, 'thumbnails' | 'vertical' | 'active' | 'iconOnly' | 'primary' | 'disableClickableNav'>> & { hasContent: boolean; hasIndicator: boolean; }; export declare const carouselNavigationItemClassName = "ui-carousel__navigationitem"; export declare const carouselNavigationItemSlotClassNames: CarouselNavigationItemSlotClassNames; /** * A CarouselItem is an actionable item within a Carousel. */ export declare const CarouselNavigationItem: (<TExtendedElementType extends React.ElementType<any> = "li">(props: React.RefAttributes<HTMLLIElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof CarouselNavigationItemProps> & { as?: TExtendedElementType; } & CarouselNavigationItemProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<CarouselNavigationItemProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; /** A navigation may be clickable */ contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<CarouselNavigationItemProps & { as: "li"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLLIElement> & Omit<Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & { ref?: React.Ref<HTMLLIElement>; }, "as" | keyof CarouselNavigationItemProps> & { as?: "li"; } & CarouselNavigationItemProps; } & FluentComponentStaticProps<CarouselNavigationItemProps>;