@commercelayer/react-components
Version:
The Official Commerce Layer React Components
22 lines (21 loc) • 882 B
TypeScript
import { type JSX } from 'react';
import type { ChildrenFunction } from '../../typings/index';
import type { LineItem } from '@commercelayer/sdk';
interface ChildrenProps extends Omit<Props, 'children'> {
quantity: number;
handleChange: (event: React.MouseEvent<HTMLSelectElement>) => void;
lineItem?: LineItem;
}
type Props = {
children?: ChildrenFunction<ChildrenProps>;
max?: number;
disabled?: boolean;
readonly?: boolean;
/**
* force the update of the line item price using `_external_price: true` attribute
* @link https://docs.commercelayer.io/core/external-resources/external-prices
*/
hasExternalPrice?: boolean;
} & (Omit<JSX.IntrinsicElements['select'], 'children'> & Omit<JSX.IntrinsicElements['span'], 'children'>);
export declare function LineItemQuantity(props: Props): JSX.Element;
export default LineItemQuantity;