UNPKG

1.73 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverridableComponent, OverrideProps } from '@mui/types';
3import { SxProps } from '@mui/system';
4import { Breakpoint, Theme } from '../styles';
5type ResponsiveStyleValue<T> = T | Array<T | null> | {
6 [key in Breakpoint]?: T | null;
7};
8export interface PigmentStackOwnProps {
9 /**
10 * The content of the component.
11 */
12 children?: React.ReactNode;
13 /**
14 * Defines the `flex-direction` style property.
15 * It is applied for all screen sizes.
16 * @default 'column'
17 */
18 direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
19 /**
20 * Defines the space between immediate children.
21 * @default 0
22 */
23 spacing?: ResponsiveStyleValue<number | string>;
24 /**
25 * Add an element between each child.
26 */
27 divider?: React.ReactNode;
28 /**
29 * The system prop, which allows defining system overrides as well as additional CSS styles.
30 */
31 sx?: SxProps<Theme>;
32}
33export interface PigmentStackTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> {
34 props: AdditionalProps & PigmentStackOwnProps;
35 defaultComponent: RootComponent;
36}
37export type PigmentStackProps<RootComponent extends React.ElementType = PigmentStackTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<PigmentStackTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
38 component?: React.ElementType;
39};
40/**
41 *
42 * Demos:
43 *
44 * - [Stack](https://mui.com/material-ui/react-stack/)
45 *
46 * API:
47 *
48 * - [PigmentStack API](https://mui.com/material-ui/api/pigment-stack/)
49 */
50declare const PigmentStack: OverridableComponent<PigmentStackTypeMap>;
51export default PigmentStack;