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

17 lines 1.2 kB
// 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 InternalIcon from '../icon/internal'; import styles from './styles.css.js'; export const TabButton = React.forwardRef(({ active, disabled, iconName, onClick, onFocus, onBlur, tabIndex, ariaHidden, ariaLabel, paneId, isRefresh, count, text, className, id, }, ref) => { return (React.createElement("button", { className: clsx([styles['tab-button'], className], { [styles['tab-button--active']]: active, [styles['tab-button--disabled']]: disabled, [styles['tab-button--refresh']]: isRefresh, }), id: id, type: "button", onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, ref: ref, tabIndex: tabIndex, role: "tab", "aria-selected": active, "aria-controls": paneId, "aria-hidden": ariaHidden, "aria-label": ariaLabel }, React.createElement(InternalIcon, { name: iconName }), React.createElement("span", { className: styles.count }, count), React.createElement("span", { className: styles.text }, text))); }); //# sourceMappingURL=tab-button.js.map