@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
21 lines • 1.52 kB
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import clsx from 'clsx';
import { createWidgetizedComponent } from '../../../internal/widgets';
import { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';
import { isWidgetReady } from '../state/invariants';
import sharedStyles from '../../resize/styles.css.js';
import styles from '../skeleton/styles.css.js';
export const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }) => {
if (!isWidgetReady(appLayoutState)) {
return null;
}
const { splitPanelPosition, placement, activeGlobalBottomDrawerId, bottomDrawerReportedSize, isMobile } = appLayoutState.widgetizedState;
return (React.createElement(React.Fragment, null, splitPanelPosition === 'bottom' && (React.createElement("div", { className: clsx(styles['split-panel-bottom'], sharedStyles['with-motion-vertical']), style: {
insetBlockEnd: placement.insetBlockEnd + (activeGlobalBottomDrawerId && !isMobile ? bottomDrawerReportedSize : 0),
} },
React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals }, appLayoutProps.splitPanel)))));
};
export const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);
//# sourceMappingURL=bottom-content-slot.js.map