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

19 lines (18 loc) 1.24 kB
import { __assign, __rest } from "tslib"; import clsx from 'clsx'; import React from 'react'; import { getBaseProps } from '../internal/base-component'; import StatusIndicator from '../status-indicator'; import styles from './styles.css.js'; import { useTelemetry } from '../internal/hooks/use-telemetry'; export default function HelpPanel(_a) { var header = _a.header, footer = _a.footer, children = _a.children, loading = _a.loading, loadingText = _a.loadingText, restProps = __rest(_a, ["header", "footer", "children", "loading", "loadingText"]); useTelemetry('HelpPanel'); var baseProps = getBaseProps(restProps); var containerProps = __assign(__assign({}, baseProps), { className: clsx(baseProps.className, styles['help-panel']) }); return loading ? (React.createElement("div", __assign({}, containerProps), React.createElement(StatusIndicator, { type: "loading" }, loadingText))) : (React.createElement("div", __assign({}, containerProps), header && React.createElement("div", { className: clsx(styles.header) }, header), React.createElement("div", { className: clsx(styles.content) }, children), footer && React.createElement("div", { className: styles.footer }, footer))); }