UNPKG

2.1 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { SlotComponentProps } from '../utils/types';
4import { ButtonBaseProps } from '../ButtonBase';
5import { SvgIcon, Theme } from '..';
6import { TabScrollButtonClasses } from './tabScrollButtonClasses';
7
8export interface TabScrollButtonStartIconSlotPropsOverrides {}
9export interface TabScrollButtonEndIconSlotPropsOverrides {}
10
11export interface TabScrollButtonOwnerState extends TabScrollButtonProps {
12 isRtl: boolean;
13}
14
15export interface TabScrollButtonProps extends ButtonBaseProps {
16 /**
17 * The content of the component.
18 */
19 children?: React.ReactNode;
20 /**
21 * Override or extend the styles applied to the component.
22 */
23 classes?: Partial<TabScrollButtonClasses>;
24 /**
25 * The components used for each slot inside.
26 * @default {}
27 */
28 slots?: {
29 StartScrollButtonIcon?: React.ElementType;
30 EndScrollButtonIcon?: React.ElementType;
31 };
32 /**
33 * The extra props for the slot components.
34 * You can override the existing props or add new ones.
35 * @default {}
36 */
37 slotProps?: {
38 startScrollButtonIcon?: SlotComponentProps<
39 typeof SvgIcon,
40 TabScrollButtonStartIconSlotPropsOverrides,
41 TabScrollButtonOwnerState
42 >;
43 endScrollButtonIcon?: SlotComponentProps<
44 typeof SvgIcon,
45 TabScrollButtonEndIconSlotPropsOverrides,
46 TabScrollButtonOwnerState
47 >;
48 };
49 /**
50 * The direction the button should indicate.
51 */
52 direction: 'left' | 'right';
53 /**
54 * If `true`, the component is disabled.
55 * @default false
56 */
57 disabled?: boolean;
58 /**
59 * The component orientation (layout flow direction).
60 */
61 orientation: 'horizontal' | 'vertical';
62 /**
63 * The system prop that allows defining system overrides as well as additional CSS styles.
64 */
65 sx?: SxProps<Theme>;
66}
67
68/**
69 *
70 * Demos:
71 *
72 * - [Tabs](https://mui.com/material-ui/react-tabs/)
73 *
74 * API:
75 *
76 * - [TabScrollButton API](https://mui.com/material-ui/api/tab-scroll-button/)
77 */
78export default function TabScrollButton(props: TabScrollButtonProps): React.JSX.Element;