@fluentui/react-northstar
Version:
A themable React component library.
56 lines (55 loc) • 2.98 kB
TypeScript
import { Accessibility, ButtonBehaviorProps } from '@fluentui/accessibility';
import * as PropTypes from 'prop-types';
import * as React from 'react';
import { UIComponentProps, ChildrenComponentProps, ContentComponentProps } from '../../utils';
import { ComponentEventHandler, FluentComponentStaticProps, ShorthandValue } from '../../types';
import { BoxProps } from '../Box/Box';
export interface CarouselPaddleProps extends UIComponentProps, ContentComponentProps<ShorthandValue<BoxProps>>, ChildrenComponentProps {
/** Accessibility behavior if overridden by the user. */
accessibility?: Accessibility<ButtonBehaviorProps>;
/** A paddle can show that it cannot be interacted with. */
disabled?: boolean;
/** Indicates whether the paddle should be hidden. */
hidden?: boolean;
/**
* Called after a user clicks the paddle.
* @param event - React's original SyntheticEvent.
* @param data - All props.
*/
onClick?: ComponentEventHandler<CarouselPaddleProps>;
/** A paddle can indicate that it slides to the next item. */
next?: boolean;
/** A paddle can indicate that it slides to the previous item. */
previous?: boolean;
/** A navigation may be clickable */
disableClickableNav?: boolean;
}
export declare type CarouselPaddleSlotClassNames = {
content: string;
};
export declare type CarouselPaddleStylesProps = Pick<CarouselPaddleProps, 'disabled' | 'next' | 'previous' | 'hidden' | 'disableClickableNav'>;
export declare const carouselPaddleClassName = "ui-carousel__paddle";
export declare const carouselPaddleSlotClassNames: CarouselPaddleSlotClassNames;
/**
* A CarouselPaddle allows users to customize the paddles inside the Carousel component.
*
* @accessibility
* Implements [ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/#button) design pattern.
*/
export declare const CarouselPaddle: (<TExtendedElementType extends React.ElementType<any> = "button">(props: React.RefAttributes<HTMLButtonElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof CarouselPaddleProps> & {
as?: TExtendedElementType;
} & CarouselPaddleProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<CarouselPaddleProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: PropTypes.ValidationMap<any>;
defaultProps?: Partial<CarouselPaddleProps & {
as: "button";
}>;
displayName?: string;
readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLButtonElement> & Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
ref?: React.Ref<HTMLButtonElement>;
}, "as" | keyof CarouselPaddleProps> & {
as?: "button";
} & CarouselPaddleProps;
} & FluentComponentStaticProps<CarouselPaddleProps>;