pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
33 lines (32 loc) • 990 B
TypeScript
import * as React from "react";
import { ContainerProps } from "../util";
export interface ButtonViewProps extends ContainerProps {
buttonRef?: (ref: HTMLButtonElement) => void;
title: string;
label?: string | JSX.Element;
labelClassName?: string;
leftIcon?: string;
rightIcon?: string;
disabled?: boolean;
hardDisabled?: boolean;
href?: string;
target?: string;
tabIndex?: number;
style?: React.CSSProperties;
/** Miscellaneous aria pass-through props */
ariaControls?: string;
ariaExpanded?: boolean;
ariaHasPopup?: string;
ariaPosInSet?: number;
ariaSetSize?: number;
ariaSelected?: boolean;
ariaPressed?: boolean | "mixed";
}
export interface ButtonProps extends ButtonViewProps {
onClick: () => void;
onRightClick?: () => void;
onBlur?: () => void;
onFocus?: () => void;
onKeydown?: (e: React.KeyboardEvent) => void;
}
export declare const Button: (props: ButtonProps) => JSX.Element;