@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
14 lines • 998 B
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback } from 'react';
import { AnnotationIcon } from './annotation-icon';
import styles from './styles.css.js';
export default React.forwardRef(function AnnotationTrigger({ open, onClick: onClickHandler, i18nStrings, taskLocalStepIndex, totalLocalSteps }, ref) {
const onClick = useCallback((event) => {
event.preventDefault();
onClickHandler();
}, [onClickHandler]);
return (React.createElement("button", { ref: ref, className: styles.hotspot, "aria-haspopup": "dialog", "aria-expanded": open, "aria-label": i18nStrings.labelHotspot(open, taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0), onClick: onClick },
React.createElement(AnnotationIcon, { open: open })));
});
//# sourceMappingURL=annotation-trigger.js.map