UNPKG

@kwiz/fluentui

Version:
22 lines (21 loc) 1.02 kB
import { ButtonProps, CompoundButtonProps } from '@fluentui/react-components'; import React, { HTMLAttributeAnchorTarget } from 'react'; export interface iButtonEXProps { title: string; showTitleWithIcon?: boolean; dontStretch?: boolean; hideOnPrint?: boolean; dontCenterText?: boolean; hoverIcon?: JSX.Element; hoverTitle?: string; onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement, MouseEvent>) => void | undefined; /** href will be set to an onclick, with either window.open(href) or window.location.href={href} depending on the target */ href?: string; target?: HTMLAttributeAnchorTarget; variant?: "danger" | "success" | "primary-subtle" | "danger-subtle"; } export interface iButtonEXPropsCompound extends iButtonEXProps { width?: string | number; } export type ButtonEXProps = iButtonEXProps & Omit<ButtonProps, "onClick" | "title">; export type CompoundButtonEXProps = iButtonEXPropsCompound & Omit<CompoundButtonProps, "onClick" | "title">;