@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
34 lines (33 loc) • 1.25 kB
TypeScript
import type { AttrString } from "marko/tags-html";
import type { WithNormalizedProps } from "../../global";
import type { Input as ButtonInput } from "../ebay-button/index.marko";
interface IconButtonInput extends Omit<Marko.HTML.Button, `on${string}` | "type">, Omit<Marko.HTML.A, `on${string}`> {
"badge-number"?: number | string;
href?: string;
transparent?: boolean;
priority?: "primary" | "secondary" | "tertiary" | "none";
size?: "small" | "large";
partiallyDisabled?: ButtonInput["partiallyDisabled"];
"badge-aria-label"?: AttrString;
"on-click"?: (event: {
originalEvent: MouseEvent;
}) => void;
"on-escape"?: (event: {
originalEvent: KeyboardEvent;
}) => void;
"on-focus"?: (event: {
originalEvent: FocusEvent;
}) => void;
"on-blur"?: (event: {
originalEvent: FocusEvent;
}) => void;
}
export interface Input extends WithNormalizedProps<IconButtonInput> {
}
declare class IconButton extends Marko.Component<Input> {
handleClick(originalEvent: MouseEvent): void;
handleKeydown(originalEvent: KeyboardEvent): void;
handleFocus(originalEvent: FocusEvent): void;
handleBlur(originalEvent: FocusEvent): void;
}
export default IconButton;