wix-style-react
Version:
wix-style-react
69 lines • 3.83 kB
TypeScript
export default TextButton;
declare class TextButton extends React.PureComponent<any, any, any> {
static displayName: string;
static propTypes: {
/** Renders component as any other component or a given HTML tag */
as: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
/** Specifies a CSS class name to be appended to the component’s root element */
className: PropTypes.Requireable<string>;
/** Specifies the skin of a button */
skin: PropTypes.Requireable<string>;
/** Specifies whether to display and when to display an underline below button label */
underline: PropTypes.Requireable<string>;
/** Controls the font weight of button label */
weight: PropTypes.Requireable<string>;
/** Controls the size of a button */
size: PropTypes.Requireable<string>;
/** Defines a callback function which is called every time a button is clicked */
onClick: PropTypes.Requireable<(...args: any[]) => any>;
/** Pass an icon or a component to display at the end of a label (e.g., svg, image, etc.) */
suffixIcon: PropTypes.Requireable<PropTypes.ReactElementLike>;
/** Pass an icon or a component to display at the front of a label (e.g., svg, image, etc.) */
prefixIcon: PropTypes.Requireable<PropTypes.ReactElementLike>;
/** Specifies whether user interactions are disabled */
disabled: PropTypes.Requireable<boolean>;
/** Accepts any item as a child element. For all common cases pass a standard text string. */
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Applies a data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** Stretches button to fill a 100% of its parent container width */
fluid: PropTypes.Requireable<boolean>;
/** Specifies whether component handles text overflow with ellipsis. If enabled, label that exceed available space will be displayed inside of a tooltip when user hover over a button. */
ellipsis: PropTypes.Requireable<boolean>;
/** Specifies whether the full button label is displayed in a tooltip when label overflows available space.
*
* Behaviour is enabled by default. Set property value to false to show ellipsis without a tooltip. */
showTooltip: PropTypes.Requireable<boolean>;
/** Allows to pass all common tooltip props. Use it to customize a tooltip created from text ellipsis.
* @linkTypeTo components-overlays--tooltip
*/
tooltipProps: PropTypes.Requireable<PropTypes.InferProps<any>>;
/** Defines a string value that labels the button element to screen reader users */
ariaLabel: PropTypes.Requireable<string>;
/** Identifies the element that labels the button element */
ariaLabelledBy: PropTypes.Requireable<string>;
/** Indicates to screen reader users whether an interactive popup element, such as menu or dialog, can be triggered by a button */
ariaHaspopup: PropTypes.Requireable<string>;
/** Indicates to screen reader users whether the collapsable content below is in the expanded or in the collapsed state */
ariaExpanded: PropTypes.Requireable<boolean>;
};
static defaultProps: {
skin: string;
underline: string;
weight: string;
size: string;
disabled: boolean;
fluid: boolean;
tooltipProps: {};
};
constructor(props: any);
button: React.RefObject<any>;
/**
* Sets focus on the element
*/
focus: () => void;
render(): React.JSX.Element;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=TextButton.d.ts.map