@wix/design-system
Version:
@wix/design-system
38 lines • 1.63 kB
TypeScript
import { MouseEventHandler, ReactNode } from 'react';
import { IconElement } from '../common';
import { ButtonWithAsProp } from '../Button';
export interface FloatingNotificationProps {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook?: string;
/** Specifies a CSS class name to be appended to the component’s root element.
* @internal
*/
className?: string;
/** the type of notification
* @default 'standard'
*/
type?: FloatingNotificationType;
/** decides if to show the close button
* @default true
*/
showCloseButton?: boolean;
/** close button on click handler */
onClose?: MouseEventHandler<HTMLButtonElement>;
/** props to pass to textButton - renders the TextButton when not empty*/
textButtonProps?: FloatingNotificationButtonProps;
/** props to pass to button - renders the Button when not empty */
buttonProps?: FloatingNotificationButtonProps;
/** An icon element to appear before content */
prefixIcon?: IconElement;
/** The text content of the notification */
text?: ReactNode;
/** The width of the content container of the notification */
width?: string;
/** Is notification full width (removes left and right border, border radius, more height and bigger paddings) */
fullWidth?: boolean;
}
export type FloatingNotificationType = 'standard' | 'success' | 'destructive' | 'warning' | 'premium' | 'preview' | 'dark';
export type FloatingNotificationButtonProps = ButtonWithAsProp<{
label?: ReactNode;
}>;
//# sourceMappingURL=FloatingNotification.types.d.ts.map