UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

16 lines (15 loc) 944 B
import { __assign, __rest } from "tslib"; import React from 'react'; import styles from './styles.css.js'; function StaticNotifications(_a) { var children = _a.children, labels = _a.labels; return (React.createElement("div", { className: styles.notifications, role: "region", "aria-label": labels === null || labels === void 0 ? void 0 : labels.notifications }, children)); } var StickyNotifications = React.forwardRef(function (props, ref) { return (React.createElement("div", { style: { top: props.topOffset }, className: styles['notifications-sticky'], ref: ref }, React.createElement(StaticNotifications, __assign({}, props)))); }); export var Notifications = React.forwardRef(function (_a, ref) { var sticky = _a.sticky, rest = __rest(_a, ["sticky"]); return sticky ? React.createElement(StickyNotifications, __assign({}, rest, { ref: ref })) : React.createElement(StaticNotifications, __assign({}, rest)); });