@commercelayer/react-components
Version:
The Official Commerce Layer React Components
32 lines (31 loc) • 993 B
TypeScript
import type { QueryParamsList } from '@commercelayer/sdk';
import { type ReactNode, type JSX } from 'react';
interface Props {
/**
* An array of skus to display.
*/
skus: string[];
/**
* Accept a React node and [Skus](./Skus.d.ts) component as children to display above the skus.
*/
children: ReactNode;
/**
* An object params to query the skus resource
*/
queryParams?: QueryParamsList;
}
/**
* Main container for the SKUs components.
* It stores - in its context - the details for each `sku` defined in the `skus` prop array.
*
* It also accept a `queryParams` prop to refine pagination, sorting, filtering and includes for the fetch request.
*
* <span title='Requirements' type='warning'>
* Must be a child of the `<CommerceLayer>` component.
* </span>
* <span title='Children' type='info'>
* `<Skus>`
* </span>
*/
export declare function SkusContainer<P extends Props>(props: P): JSX.Element;
export default SkusContainer;