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

21 lines 1.61 kB
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 'use client'; import React, { useContext } from 'react'; import clsx from 'clsx'; import { hotspotContext } from '../annotation-context/context'; import { getBaseProps } from '../internal/base-component'; import useBaseComponent from '../internal/hooks/use-base-component'; import { applyDisplayName } from '../internal/utils/apply-display-name'; import TutorialDetailView from './components/tutorial-detail-view'; import TutorialList from './components/tutorial-list'; import styles from './styles.css.js'; export default function TutorialPanel({ i18nStrings, loading, tutorials, onFeedbackClick, downloadUrl, ...restProps }) { const { __internalRootRef } = useBaseComponent('TutorialPanel'); const baseProps = getBaseProps(restProps); const context = useContext(hotspotContext); return (React.createElement(React.Fragment, null, React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles['tutorial-panel']), ref: __internalRootRef }, context.currentTutorial ? (React.createElement(TutorialDetailView, { i18nStrings: i18nStrings, tutorial: context.currentTutorial, onExitTutorial: context.onExitTutorial, currentStepIndex: context.currentStepIndex, onFeedbackClick: onFeedbackClick })) : (React.createElement(TutorialList, { i18nStrings: i18nStrings, tutorials: tutorials, loading: loading, onStartTutorial: context.onStartTutorial, downloadUrl: downloadUrl }))))); } applyDisplayName(TutorialPanel, 'TutorialPanel'); //# sourceMappingURL=index.js.map