UNPKG

@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

24 lines 1.81 kB
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import { createWidgetizedComponent } from '../../../internal/widgets'; import { SplitPanelProvider } from '../../split-panel'; import { getDrawerStyles } from '../compute-layout'; import styles from './styles.css.js'; export function AppLayoutSplitPanelDrawerSideImplementation({ children, appLayoutInternals, splitPanelInternals, }) { const { splitPanelControlId, placement, verticalOffsets, isMobile, splitPanelAnimationDisabled } = appLayoutInternals; const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement); return (React.createElement(SplitPanelProvider, Object.assign({}, splitPanelInternals, { animationDisabled: splitPanelAnimationDisabled }), React.createElement("section", { id: splitPanelControlId, className: styles['split-panel-side'], style: { blockSize: drawerHeight, insetBlockStart: drawerTopOffset, } }, children))); } export function AppLayoutSplitPanelDrawerBottomImplementation({ children, splitPanelInternals, appLayoutInternals, }) { const { splitPanelControlId, splitPanelAnimationDisabled } = appLayoutInternals; return (React.createElement(SplitPanelProvider, Object.assign({}, splitPanelInternals, { animationDisabled: splitPanelAnimationDisabled }), React.createElement("section", { id: splitPanelControlId }, children))); } export const createWidgetizedAppLayoutSplitPanelDrawerSide = createWidgetizedComponent(AppLayoutSplitPanelDrawerSideImplementation); export const createWidgetizedAppLayoutSplitPanelDrawerBottom = createWidgetizedComponent(AppLayoutSplitPanelDrawerBottomImplementation); //# sourceMappingURL=index.js.map