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.17 kB
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import { __rest } from "tslib"; import React from 'react'; import clsx from 'clsx'; import { getBaseProps } from '../internal/base-component'; import DismissButton from './dismiss-button'; import styles from './styles.css.js'; export function Token(_a) { var { ariaLabel, disabled, readOnly, dismissLabel, onDismiss, children } = _a, restProps = __rest(_a, ["ariaLabel", "disabled", "readOnly", "dismissLabel", "onDismiss", "children"]); const baseProps = getBaseProps(restProps); return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.token, baseProps.className), role: "group", "aria-label": ariaLabel, "aria-disabled": disabled }), React.createElement("div", { className: clsx(styles['token-box'], disabled && styles['token-box-disabled'], readOnly && styles['token-box-readonly']) }, children, onDismiss && (React.createElement(DismissButton, { disabled: disabled, dismissLabel: dismissLabel, onDismiss: onDismiss, readOnly: readOnly }))))); } //# sourceMappingURL=token.js.map