import { FunctionComponent } from 'react'; export interface AnchorProps { activeColor?: ColorInterface; activeColorIndex?: number; } export interface Price { currencyISO: string; formatted: string; value: number; } export interface ColorInterface { code: string; colorCode: string; imageURI: string | string[]; swatch: string; price: Price; wasPrice?: Price | null; } export interface ProductInterace { code: string; name: string; status?: string; type: string; url: string; rating: number | null; colors?: ColorInterface[]; lifestyle?: string | string[]; ActiveColorLink?: (props: any) => FunctionComponent; ProductLink?: (props: any) => FunctionComponent; /* Maybe not needed, would be good for a top level price */ price?: Price; } export interface ProductCellInterface extends ProductInterace { /** * Show color swatches * * * @default false */ showSwatches?: boolean; /** * Show product rating * * * @default false */ showRating?: boolean; /** * A React element to render the wrapping anchors of the Product cell * * e.g. { () => } */ linkRenderer?: () => void; }