@jupyter/web-components
Version:
A component library for building extensions in Jupyter frontends.
63 lines (62 loc) • 2.01 kB
TypeScript
import { Button } from '@microsoft/fast-foundation';
import { buttonStyles as styles } from './button.styles.js';
/**
* Scale locally an element.
*/
export type ButtonScale = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
/**
* Types of button appearance.
* @public
*/
export type ButtonAppearance = 'accent' | 'error' | 'lightweight' | 'neutral' | 'outline' | 'stealth';
/**
* Button class
*
* @public
* @tagname jp-button
*/
declare class JupyterButton extends Button {
/**
* The appearance the button should have.
*
* @public
* @remarks
* HTML Attribute: appearance
*/
appearance: ButtonAppearance;
/**
* Whether the button has a compact layout or not.
*
* @public
* @remarks
*
* @deprecated Use {@link scale} `xsmall` instead
* HTML Attribute: minimal
*/
minimal: boolean;
/**
* Scale the element compared to the theme size.
*/
scale?: ButtonScale;
/**
* Applies 'icon-only' class when there is only an SVG in the default slot
*
* @public
* @remarks
*/
defaultSlottedContentChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
}
/**
* A function that returns a {@link @microsoft/fast-foundation#Button} registration for configuring the component with a DesignSystem.
* Implements {@link @microsoft/fast-foundation#buttonTemplate}
*
*
* @public
* @remarks
* Generates HTML Element: `<jp-button>`
*
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
*/
export declare const jpButton: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof JupyterButton>;
export { JupyterButton as Button };
export { styles as buttonStyles };