` with your custom element.
*
* Use this when you need a different element type or custom structure.
* See the `children` prop for usage details.
*
* Default: `false`
*/
asChild?: boolean;
/**
* When using `asChild`, pass a React element, render function, or render object.
*
* **React element:** This must be an element that can have children, such as
or
. Your element receives the default element's props automatically.
*
* **Render function:** Your function receives:
* - `error` (`string | null`): The error message, or `null` if no error.
*
* **Render object:** You can use a render object in the form `{ render: (props, ref) => ReactNode }` as an alternative to a render function. Receives the same props as the function.
*/
children?: AsChildChildren<{
error: string | null;
}>;
/**
* CSS class name applied to the error container element.
*
* The element has a `data-error` attribute containing the error message.
* To style when an error is present, target with `data-[error]:`.
*/
className?: string;
}
/**
* Displays product list errors.
*
* Only renders when there is an error.
*
* @component
* @example Basic usage
* ```tsx
* // import { ProductList } from '@wix/stores/components';
* //
* // ProductList.Error must be wrapped in ProductList.Root
*
* // Default styling
*
*
* // Custom styling
*
* ```
*
* @example Custom rendering with `asChild`
* ```tsx
* // import { ProductList } from '@wix/stores/components';
* //
* // ProductList.Error must be wrapped in ProductList.Root
*
* // asChild with React element - Syntax demonstration for alternative element type
*
*
*
*
* // asChild with render function - Adds error label
*
* {React.forwardRef(({ error, ...props }, ref) => (
*
* Error: {error}
*
* ))}
*
*
* // asChild with render object - Adds error label
*
* {{
* render: ({ error, ...props }, ref) => (
*
* Error: {error}
*
* )
* }}
*
* ```
*/
export declare const Error: React.ForwardRefExoticComponent
>;