UNPKG

3.04 kBSource Map (JSON)View Raw
1{"version":3,"file":"ShimmeredDetailsList.types.js","sourceRoot":"../src/","sources":["components/DetailsList/ShimmeredDetailsList.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { IDetailsListProps } from './DetailsList.types';\nimport type { IDetailsRowProps } from './DetailsRow.types';\nimport type { IStyle } from '../../Styling';\nimport type { IStyleFunctionOrObject } from '../../Utilities';\n\n/**\n * ShimmeredDetailsList props interface\n * {@docCategory DetailsList}\n */\nexport interface IShimmeredDetailsListProps extends Omit<IDetailsListProps, 'styles'> {\n /**\n * DetailsList styles to pass through.\n */\n detailsListStyles?: IDetailsListProps['styles'];\n\n /**\n * Boolean flag to control when to render placeholders vs real items.\n * It's up to the consumer app to know when fetching of the data is done to toggle this prop.\n */\n enableShimmer?: boolean;\n\n /**\n * Aria label for shimmer. Set on grid while shimmer is enabled.\n */\n ariaLabelForShimmer?: string;\n\n /**\n * Determines whether to remove a fading out to bottom overlay over the shimmering items\n * used to further emphasize the unknown number of items that will be fetched.\n */\n removeFadingOverlay?: boolean;\n\n /**\n * Custom placeholder renderer to be used when in need to override the default placeholder of a DetailsRow.\n * `rowProps` argument is passed to leverage the calculated column measurements done by DetailsList\n * or you can use the optional arguments of item `index` and `defaultRender` to execute additional\n * logic before rendering the default placeholder.\n */\n onRenderCustomPlaceholder?: (\n rowProps: IDetailsRowProps,\n index?: number,\n defaultRender?: (props: IDetailsRowProps) => React.ReactNode,\n ) => React.ReactNode;\n\n /**\n * Custom styles to override the styles specific to the ShimmeredDetailsList root area.\n * @deprecated Use `styles` prop instead. Any value provided will be ignored.\n */\n shimmerOverlayStyles?: IStyleFunctionOrObject<IShimmeredDetailsListStyleProps, IShimmeredDetailsListStyles>;\n\n /**\n * Custom styles to override the styles specific to the ShimmeredDetailsList root area.\n */\n styles?: IStyleFunctionOrObject<IShimmeredDetailsListStyleProps, IShimmeredDetailsListStyles>;\n\n /**\n * Number of shimmer placeholder lines to render.\n * @defaultvalue 10\n */\n shimmerLines?: number;\n}\n\n/**\n * Defines props needed to construct styles.\n * This represents the simplified set of immutable things which control the class names.\n * {@docCategory DetailsList}\n */\nexport type IShimmeredDetailsListStyleProps = Required<Pick<IShimmeredDetailsListProps, 'theme'>>;\n\n/**\n * Represents the stylable areas of the control.\n * {@docCategory DetailsList}\n */\nexport interface IShimmeredDetailsListStyles {\n /**\n * Represents styles passed to the `List` component for creating a fade-out to the bottom overlay.\n */\n root: IStyle;\n}\n"]}
\No newline at end of file