react_size_chart
Version:
Vestfoy smart size charts react package
106 lines (105 loc) • 2.74 kB
TypeScript
import React from 'react';
import $ from 'jquery';
import '../../assets/bootstrap-3.4.1.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 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;
/**
* 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;
/**
* 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;