@wix/design-system
Version:
@wix/design-system
59 lines • 2.8 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
import { FloatingNotificationProps } from './FloatingNotification.types';
/**
* Displays simple and temporary messages or destructive events
*/
declare class FloatingNotification extends React.PureComponent<FloatingNotificationProps> {
static displayName: string;
static propTypes: {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** Specifies a CSS class name to be appended to the component’s root element.
* @internal
*/
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;
};
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;
}
export default FloatingNotification;
//# sourceMappingURL=FloatingNotification.d.ts.map