Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
import type { ElementType, MouseEvent } from 'react';
|
|
import type React from 'react';
|
|
type secondaryAction = {
|
|
label: string;
|
|
onClick: (event: MouseEvent) => void;
|
|
};
|
|
export type Props = {
|
|
'aria-label'?: string;
|
|
buttonId?: string;
|
|
buttonStyle?: 'error' | 'icon-label' | 'none' | 'pill' | 'primary' | 'secondary' | 'subtle' | 'tab' | 'transparent';
|
|
children?: React.ReactNode;
|
|
className?: string;
|
|
disabled?: boolean;
|
|
el?: 'anchor' | 'link' | ElementType;
|
|
/**
|
|
* Setting to `true` will allow the submenu to be opened when the button is disabled
|
|
*/
|
|
enableSubMenu?: boolean;
|
|
extraButtonProps?: Record<string, any>;
|
|
icon?: ['chevron' | 'edit' | 'plus' | 'x'] | React.ReactNode;
|
|
iconPosition?: 'left' | 'right';
|
|
iconStyle?: 'none' | 'with-border' | 'without-border';
|
|
id?: string;
|
|
/**
|
|
* @deprecated
|
|
* This prop is deprecated and will be removed in the next major version.
|
|
* Components now import their own `Link` directly from `next/link`.
|
|
*/
|
|
Link?: React.ElementType;
|
|
margin?: boolean;
|
|
newTab?: boolean;
|
|
onClick?: (event: MouseEvent) => void;
|
|
onMouseDown?: (event: MouseEvent) => void;
|
|
/**
|
|
* Enables form submission via an onClick handler. This is only needed if
|
|
* type="submit" does not trigger form submission, e.g. if the button DOM
|
|
* element is not a direct child of the form element.
|
|
*
|
|
* @default false
|
|
*/
|
|
programmaticSubmit?: boolean;
|
|
ref?: React.RefObject<HTMLAnchorElement | HTMLButtonElement | null>;
|
|
round?: boolean;
|
|
secondaryActions?: secondaryAction | secondaryAction[];
|
|
size?: 'large' | 'medium' | 'small' | 'xsmall';
|
|
SubMenuPopupContent?: (props: {
|
|
close: () => void;
|
|
}) => React.ReactNode;
|
|
to?: string;
|
|
tooltip?: string;
|
|
type?: 'button' | 'submit';
|
|
url?: string;
|
|
};
|
|
export {};
|
|
//# sourceMappingURL=types.d.ts.map |