wix-style-react
Version:
wix-style-react
58 lines • 2.73 kB
TypeScript
export default FloatingNotification;
/**
* Displays simple and temporary messages or destructive events
*/
declare class FloatingNotification extends React.PureComponent<any, any, any> {
static displayName: string;
static propTypes: {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** A css class to be applied to the component's root element */
className: PropTypes.Requireable<string>;
/** the type of notification */
type: PropTypes.Requireable<string>;
/** decides if to show the close button */
showCloseButton: PropTypes.Requireable<boolean>;
/** close button on click handler */
onClose: PropTypes.Requireable<(...args: any[]) => any>;
/** props to pass to textButton - renders the TextButton when not empty*/
textButtonProps: PropTypes.Requireable<PropTypes.InferProps<{
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
as: PropTypes.Requireable<PropTypes.ReactNodeLike>;
href: PropTypes.Requireable<string>;
onClick: PropTypes.Requireable<(...args: any[]) => any>;
}>>;
/** props to pass to button - renders the Button when not empty */
buttonProps: PropTypes.Requireable<PropTypes.InferProps<{
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
as: PropTypes.Requireable<PropTypes.ReactNodeLike>;
href: PropTypes.Requireable<string>;
onClick: PropTypes.Requireable<(...args: any[]) => any>;
}>>;
/** An icon element to appear before content */
prefixIcon: PropTypes.Requireable<PropTypes.ReactElementLike>;
/** The text content of the notification */
text: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** The width of the content container of the notification */
width: PropTypes.Requireable<string>;
/** Is notification full width (removes left and right border, border radius, more height and bigger paddings) */
fullWidth: PropTypes.Requireable<boolean>;
};
static defaultProps: {
type: string;
buttonProps: {};
textButtonProps: {};
showCloseButton: boolean;
};
constructor(props: any);
constructor(props: any, context: any);
render(): React.JSX.Element;
_getIcon(): React.JSX.Element | null;
_getContent(): React.JSX.Element;
_getTextButton(): React.JSX.Element | null;
_getButton(): React.JSX.Element | null;
_getClose(): React.JSX.Element | null;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=FloatingNotification.d.ts.map