@sitecore/sc-contenthub-blok
Version:
A UI library for [Sitecore Content Hub](https://doc.sitecore.com/ch/).
52 lines • 1.82 kB
TypeScript
import { type FC, type HTMLAttributeAnchorTarget, type PropsWithChildren, Ref } from "react";
import { ButtonProps } from "../CoreComponents";
/**
* Defines the color schemes available for the BlokButton component.
*/
export type ButtonColorScheme = "primary" | "danger" | "warning" | "success" | "info" | "neutral" | "ai";
/**
* Defines the variants available for the BlokButton component.
*/
export type ButtonVariant = "solid" | "outline" | "ghost" | "link" | "toggle" | "ai" | "navigation" | "filter";
declare module "@mui/material/Button" {
interface ButtonPropsVariantOverrides {
toggle: true;
ai: true;
navigation: true;
filter: true;
link: true;
}
interface ButtonPropsColorOverrides {
ai: true;
}
interface ButtonPropsSizeOverrides {
extraSmall: true;
}
}
declare module "@mui/material/CircularProgress" {
interface CircularProgressPropsColorOverrides {
ai: true;
}
}
export interface BlokButtonProps extends Pick<ButtonProps, "size" | "startIcon" | "endIcon" | "href" | "onClick" | "onMouseOver" | "onMouseDown"> {
colorScheme?: ButtonColorScheme;
variant?: ButtonVariant;
isActive?: boolean;
isDisabled?: boolean;
isLoading?: boolean;
loadingText?: string;
isFloating?: boolean;
id: string;
className?: string;
target?: HTMLAttributeAnchorTarget;
buttonType?: "submit" | "reset" | "button";
count?: number | string;
onContextMenu?: (event?: unknown) => unknown | Promise<unknown>;
isIconButton?: boolean;
ref?: Ref<HTMLButtonElement>;
}
/**
* BlokButton component that wraps the MUI Button component with additional props and styles.
*/
export declare const BlokButton: FC<PropsWithChildren<BlokButtonProps>>;
//# sourceMappingURL=BlokButton.d.ts.map