@carbon/react
Version:
React components for the Carbon Design System
53 lines (51 loc) • 1.53 kB
JavaScript
/**
* Copyright IBM Corp. 2016, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { usePrefix } from "../../internal/usePrefix.js";
import classNames from "classnames";
import "react";
import PropTypes from "prop-types";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/components/Tabs/Tabs.Skeleton.tsx
/**
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
function Tab() {
const prefix = usePrefix();
return /* @__PURE__ */ jsx("li", {
className: `${prefix}--tabs__nav-item`,
children: /* @__PURE__ */ jsx("div", {
className: `${prefix}--tabs__nav-link`,
children: /* @__PURE__ */ jsx("span", {})
})
});
}
function TabsSkeleton({ className, contained, ...rest }) {
const prefix = usePrefix();
return /* @__PURE__ */ jsx("div", {
className: classNames(className, `${prefix}--tabs`, `${prefix}--skeleton`, { [`${prefix}--tabs--contained`]: contained }),
...rest,
children: /* @__PURE__ */ jsxs("ul", {
className: `${prefix}--tabs__nav`,
children: [
/* @__PURE__ */ jsx(Tab, {}),
/* @__PURE__ */ jsx(Tab, {}),
/* @__PURE__ */ jsx(Tab, {}),
/* @__PURE__ */ jsx(Tab, {}),
/* @__PURE__ */ jsx(Tab, {})
]
})
});
}
TabsSkeleton.propTypes = {
className: PropTypes.string,
contained: PropTypes.bool
};
//#endregion
export { TabsSkeleton as default };