react_size_chart
Version:
Vestfoy smart size charts react package
119 lines (118 loc) • 3.1 kB
TypeScript
import React from 'react';
import $ from 'jquery';
import '../../assets/bootstrap.min.css';
import '../../assets/vestofy.css';
declare global {
interface Window {
$: typeof $;
}
}
export declare enum EButtonIcon {
meter_icon = "meter",
meter_icon_dark = "meter-dark"
}
export declare enum EAlignButton {
eAlignLeft = 0,
eAlignCenter = 1,
eAlignRight = 2
}
export declare class Border {
BorderWidth: number;
BorderColor: string;
BorderRadius: number;
constructor();
}
export type VestofyPlatform = "Shopify" | "Standalone";
export type VestofyPopupOptions = {
/**
* Popup dialog title (default: Size Guide)
*/
dialogTitle?: string;
};
export type VestofyBtnOptions = {
onClick?: () => void;
/**
* Text displayed on the button that open the guid popup (default: Size Guide)
*/
buttonText?: string;
/**
* Text size displayed on the button that open the guid popup (default: 15px)
*/
buttonTextSize?: number;
/**
* Text color (hex format) displayed on the button that open the guid popup (default: #000000)
*/
buttonTextColor?: string;
/**
* Background color (hex format) of the button that open the guid popup (default: transparent)
*/
buttonBackgroundColor?: string;
/**
* Image displayed on the side of button
*/
buttonImgSrc?: EButtonIcon | string;
/**
* Button alignment in parent component rule
*/
btnAlign?: EAlignButton;
border?: Border;
/**
* Show size advice on parent window (product window)
*/
advice?: boolean;
/**
* Text to display in advice initial state
*/
adviceText?: string;
/**
* Size advice background color
*/
adviceBackgroundColor?: string;
dev: boolean;
};
type VestofyProps = {
/**
* Your shop identifier (Retrieve from app)
*/
shop: string;
/**
* On which platform the popup is used
*/
platform?: VestofyPlatform | string;
/**
* unused
*/
key?: string;
/**
* Set size chart identifier to identify single size chart
*/
size_chart_id?: string;
/**
* Set product identifier to identify size charts for product (Retrieve from app)
*/
product_id?: string;
/**
* Set collection identifier to identify size charts for group of products (Retrieve from app)
*/
collection_id?: string;
/**
* language (support: en (default), ar, es, he, pt, ru, zh)
*/
locale?: string;
/**
* Image displayed at the bottom at the size chart
*/
bottom_image?: string;
/**
* Description displayed at the bottom at the size chart
*/
bottom_description?: string;
/**
* popup properties
*/
options?: VestofyBtnOptions;
};
export declare function VestofySizeChartPopup(a_oOptions?: VestofyPopupOptions): React.JSX.Element | null;
export declare function VestofyShowBtn(props?: VestofyBtnOptions): React.JSX.Element;
declare const Vestofy: (props: VestofyProps) => React.JSX.Element;
export default Vestofy;