UNPKG

@sap-ux/ui-components

Version:

SAP UI Components Library

117 lines 3.55 kB
import React from 'react'; import type { IButtonProps, IButtonStyles } from '@fluentui/react'; import type { UIIContextualMenuProps } from '../UIContextualMenu/index.js'; export declare const BASE_STYLES: { color: string; checkedBorderColor: string; primary: { backgroundColor: string; disabledBorderColor: string; borderColor: string; hoverBackgroundColor: string; hoverBorderColor: string; }; secondary: { backgroundColor: string; disabledBorderColor: string; borderColor: string; hoverBackgroundColor: string; hoverBorderColor: string; color: string; }; alert: { backgroundColor: string; disabledBorderColor: string; borderColor: string; hoverBackgroundColor: string; hoverBorderColor: string; }; transparent: { backgroundColor: string; disabledBorderColor: string; borderColor: string; hoverBackgroundColor: string; hoverBorderColor: string; hoverBorderStyle: string; color: string; checkedBackgroundColor: string; checkedColor: string; checkedBorderStyle: string; }; height: number; }; export interface UIDefaultButtonProps extends IButtonProps { /** * Changes the visual presentation of the button to be transparent. * * @default false */ transparent?: boolean; alert?: boolean; primary?: boolean; menuProps?: UIIContextualMenuProps; } /** * UIDefaultButton component * based on https://developer.microsoft.com/en-us/fluentui#/controls/web/button * * @exports * @class UIDefaultButton * @extends {React.Component<UIDefaultButtonProps, {}>} */ export declare class UIDefaultButton extends React.Component<UIDefaultButtonProps, {}> { /** * Initializes component properties. * * @param {UIDefaultButtonProps} props */ constructor(props: UIDefaultButtonProps); /** * Method returns styles for hover and press States of root button element. * * @param checked Is styles for checked state. * @param primary Is button primary. * @param alert Is button alert. * @param transparent Is button transparent. * @returns Styles for hover and press States of root button element. */ private getInteractionStyle; /** * Returns rootDisabled style overrides based on button variant. * * @param primary - primary button variant * @param alert - alert button variant * @param transparent - transparent button variant * @returns IStyle */ private getRootDisabledStyles; /** * Returns icon style overrides based on button variant. * * @param primary - primary button variant * @param alert - alert button variant * @param transparent - transparent button variant * @returns IStyle */ private getIconStyleOverrides; /** * Returns menuIcon style overrides based on button variant. * * @param primary - primary button variant * @param alert - alert button variant * @returns IStyle */ private getMenuIconStyleOverrides; /** * Method returns styles of root button element. * * @param props Button props. * @returns Styles of root button element. */ protected setStyle: (props: UIDefaultButtonProps) => IButtonStyles; /** * @returns {JSX.Element} */ render(): JSX.Element; } //# sourceMappingURL=UIDefaultButton.d.ts.map