UNPKG

@carbon/react

Version:

React components for the Carbon Design System

45 lines (41 loc) 1.76 kB
/** * 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. */ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js'; import PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; import { usePrefix } from '../../internal/usePrefix.js'; import '../FluidTextInput/FluidTextInput.js'; import '../FluidTextInput/FluidPasswordInput.js'; import FluidTextInputSkeleton from '../FluidTextInput/FluidTextInput.Skeleton.js'; import '../FluidSelect/FluidSelect.js'; import FluidSelectSkeleton from '../FluidSelect/FluidSelect.Skeleton.js'; var _FluidTextInputSkelet, _FluidSelectSkeleton, _FluidSelectSkeleton2; const FluidTimePickerSkeleton = ({ className, isOnlyTwo, ...rest }) => { const prefix = usePrefix(); const wrapperClasses = cx(className, `${prefix}--time-picker--fluid--skeleton`, { [`${prefix}--time-picker--equal-width`]: isOnlyTwo }); return /*#__PURE__*/React.createElement("div", _extends({ className: wrapperClasses }, rest), _FluidTextInputSkelet || (_FluidTextInputSkelet = /*#__PURE__*/React.createElement(FluidTextInputSkeleton, null)), _FluidSelectSkeleton || (_FluidSelectSkeleton = /*#__PURE__*/React.createElement(FluidSelectSkeleton, null)), !isOnlyTwo ? _FluidSelectSkeleton2 || (_FluidSelectSkeleton2 = /*#__PURE__*/React.createElement(FluidSelectSkeleton, null)) : null); }; FluidTimePickerSkeleton.propTypes = { /** * Specify an optional className to add. */ className: PropTypes.string, /** * Specify if there are only two TimePicker elements */ isOnlyTwo: PropTypes.bool }; export { FluidTimePickerSkeleton as default };