@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
11 lines (10 loc) • 1.43 kB
JavaScript
import React, { useState } from 'react';
import AnnotationTrigger from './annotation-trigger';
import { AnnotationPopover } from './annotation-popover';
export function OpenAnnotation(_a) {
var title = _a.title, content = _a.content, alert = _a.alert, direction = _a.direction, showFinishButton = _a.showFinishButton, taskLocalStepIndex = _a.taskLocalStepIndex, totalLocalSteps = _a.totalLocalSteps, onDismiss = _a.onDismiss, nextButtonEnabled = _a.nextButtonEnabled, onNextButtonClick = _a.onNextButtonClick, onFinish = _a.onFinish, previousButtonEnabled = _a.previousButtonEnabled, onPreviousButtonClick = _a.onPreviousButtonClick, i18nStrings = _a.i18nStrings;
var _b = useState(null), hotspotRef = _b[0], setHotspotRef = _b[1];
return (React.createElement(React.Fragment, null,
React.createElement(AnnotationTrigger, { open: true, onClick: onDismiss, i18nStrings: i18nStrings, ref: setHotspotRef }),
hotspotRef && (React.createElement(AnnotationPopover, { track: hotspotRef, previousButtonEnabled: previousButtonEnabled, showFinishButton: showFinishButton, totalLocalSteps: totalLocalSteps, i18nStrings: i18nStrings, nextButtonEnabled: nextButtonEnabled, onDismiss: onDismiss, onFinish: onFinish, onNextButtonClick: onNextButtonClick, onPreviousButtonClick: onPreviousButtonClick, taskLocalStepIndex: taskLocalStepIndex, direction: direction, title: title, content: content, alert: alert }))));
}