@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
38 lines (37 loc) • 1.17 kB
TypeScript
import type { WithNormalizedProps } from "../../global";
interface ViewerInput {
"cdn-url"?: string;
version?: string;
class?: Marko.HTMLAttributes["class"];
"a11y-text"?: Marko.HTMLAttributes["aria-label"];
src?: string;
"error-text"?: Marko.HTMLAttributes["aria-label"];
"a11y-start-text"?: Marko.HTMLAttributes["aria-label"];
"a11y-load-text"?: Marko.HTMLAttributes["aria-label"];
poster?: string;
loading?: "auto" | "lazy" | "eager";
reveal?: "auto" | "manual";
"with-credentials"?: boolean;
"on-load-error"?: (err: CustomEvent) => void;
"on-load"?: () => void;
"on-progress"?: () => void;
"on-model-visibility"?: () => void;
"on-poster-dismissed"?: () => void;
"on-render-scale"?: () => void;
}
export interface Input extends WithNormalizedProps<ViewerInput> {
}
interface State {
showLoading: boolean;
isLoaded: boolean;
failed: boolean;
}
declare class Viewer extends Marko.Component<Input, State> {
viewer: HTMLElement;
handleError(err: Error): void;
onCreate(): void;
handleSuccess(): void;
onMount(): void;
_loadViewer(): void;
}
export default Viewer;