@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
43 lines (42 loc) • 1.53 kB
TypeScript
import type { WithNormalizedProps } from "../../global";
import type { Input as TooltipBaseInput } from "../components/ebay-tooltip-base/component-browser";
import type { Input as TooltipOverlayInput } from "../components/ebay-tooltip-overlay/component-browser";
interface TourtipInput extends Omit<Marko.HTML.Span, `on${string}` | "content"> {
open?: boolean;
"no-hover"?: TooltipBaseInput["noHover"];
host?: Marko.AttrTag<Marko.HTML.Span & {
as?: string;
renderBody?: Marko.Body;
}>;
offset?: TooltipBaseInput["offset"];
pointer?: TooltipBaseInput["pointer"];
placement?: TooltipBaseInput["placement"];
heading?: TooltipOverlayInput["heading"];
content?: TooltipOverlayInput["content"];
"a11y-close-text"?: TooltipOverlayInput["a11yCloseText"];
"no-flip"?: TooltipBaseInput["noFlip"];
"not-inline"?: TooltipBaseInput["not-inline"];
"no-shift"?: TooltipBaseInput["no-shift"];
footer?: TooltipOverlayInput["footer"] & {
index?: string;
};
"on-expand"?: () => void;
"on-collapse"?: () => void;
}
export interface Input extends WithNormalizedProps<TourtipInput> {
}
interface State {
expanded: boolean;
}
declare class Tourtip extends Marko.Component<Input, State> {
handleCollapse({ originalEvent }: {
originalEvent: Event;
}): void;
handleExpand({ originalEvent }: {
originalEvent: Event;
}): void;
onInput(input: Input): void;
onCreate(): void;
handleLoaded(): void;
}
export default Tourtip;