@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.45 kB
TypeScript
import type { WithNormalizedProps } from "../../global";
import type { Input as TooltipBaseInput } from "../components/ebay-tooltip-base/component-browser";
interface InfotipInput extends Omit<Marko.HTML.Span, `on${string}` | "content"> {
open?: boolean;
variant?: "modal" | "default";
offset?: TooltipBaseInput["offset"];
pointer?: TooltipBaseInput["pointer"];
placement?: TooltipBaseInput["placement"];
disabled?: boolean;
icon?: Marko.AttrTag<{
renderBody: Marko.Renderable;
}>;
heading?: Marko.AttrTag<Marko.HTML.Span & {
as?: keyof Marko.NativeTags;
renderBody?: Marko.Renderable;
}>;
"no-flip"?: TooltipBaseInput["no-flip"];
"not-inline"?: TooltipBaseInput["not-inline"];
"no-shift"?: TooltipBaseInput["no-shift"];
content: Marko.AttrTag<Marko.HTML.Span>;
"a11y-close-button-text"?: Marko.HTMLAttributes["aria-label"];
"on-loaded"?: () => void;
"on-expand"?: () => void;
"on-collapse"?: () => void;
}
export interface Input extends WithNormalizedProps<InfotipInput> {
}
interface State {
open: boolean;
}
declare class Infotip extends Marko.Component<Input, State> {
onInput(input: Input): void;
setOpen(isOpen: boolean): void;
handleOpenModal(): void;
handleExpand(): void;
handleOverlayClose(): void;
isExpanded(): any;
expand(): void;
collapse(): void;
handleCollapse(): void;
}
export default Infotip;