@commercelayer/react-components
Version:
The Official Commerce Layer React Components
27 lines (26 loc) • 1.01 kB
TypeScript
import type { ChildrenFunction } from '../../typings/index';
import { type JSX } from 'react';
interface Props extends Omit<JSX.IntrinsicElements['span'], 'children'> {
/**
* Function allow you to customize the component
*/
children?: ChildrenFunction<Omit<Props, 'children'>>;
/**
* Label to show. Default: 'No addresses available.'
*/
emptyText?: string;
}
/**
* The AddressesEmpty component is aimed to display a message in case no customer address is available, otherwise it won't show.
*
* It accepts an optional `emptyText` prop to customize default message.
*
* It is also possible to wrap inside this component any children elements to create a completely custom experience regarding the absence of customer addresses.
*
* <span title="Requirement" type="warning">
* It must to be used inside the `<AddressesContainer>` component.
* </span>
*
*/
export declare function AddressesEmpty(props: Props): JSX.Element | null;
export default AddressesEmpty;