@carbon/react
Version:
React components for the Carbon Design System
40 lines (38 loc) • 1.41 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 FluidSelectSkeleton from "../FluidSelect/FluidSelect.Skeleton.js";
import FluidTextInputSkeleton from "../FluidTextInput/FluidTextInput.Skeleton.js";
import classNames from "classnames";
import "react";
import PropTypes from "prop-types";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/components/FluidTimePicker/FluidTimePicker.Skeleton.tsx
/**
* Copyright IBM Corp. 2022
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const FluidTimePickerSkeleton = ({ className, isOnlyTwo, ...rest }) => {
const prefix = usePrefix();
return /* @__PURE__ */ jsxs("div", {
className: classNames(className, `${prefix}--time-picker--fluid--skeleton`, { [`${prefix}--time-picker--equal-width`]: isOnlyTwo }),
...rest,
children: [
/* @__PURE__ */ jsx(FluidTextInputSkeleton, {}),
/* @__PURE__ */ jsx(FluidSelectSkeleton, {}),
!isOnlyTwo ? /* @__PURE__ */ jsx(FluidSelectSkeleton, {}) : null
]
});
};
FluidTimePickerSkeleton.propTypes = {
className: PropTypes.string,
isOnlyTwo: PropTypes.bool
};
//#endregion
export { FluidTimePickerSkeleton as default };