ladle-inject-custom-addons
Version:
Adds a button to the Ladle addon bar
26 lines (25 loc) • 778 B
TypeScript
import React from "react";
export interface AddonButtonProps extends React.ComponentProps<"button"> {
icon: React.ReactNode;
/**
* Displayed in a tooltip on button hover. Also used as the button's default aria-label value.
*/
tooltip: string;
/**
* Adds a label to the button for accessibility purposes.
*/
label?: string;
/**
* Shows a badge on the button.
* If a number or string is provided, that value will display in the badge.
*
* @default false
*/
badge?: boolean | number | string;
/**
* Determines the position/priority of the addon button within the existing ladle addons.
* @default 0
*/
position?: number;
}
export declare const AddonButton: React.FC<AddonButtonProps>;