UNPKG

771 BJavaScriptView Raw
1"use strict";
2"use client";
3
4var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5exports.__esModule = true;
6exports.default = usePlaceholder;
7var _classnames = _interopRequireDefault(require("classnames"));
8var _ThemeProvider = require("./ThemeProvider");
9var _Col = require("./Col");
10function usePlaceholder({
11 animation,
12 bg,
13 bsPrefix,
14 size,
15 ...props
16}) {
17 bsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'placeholder');
18 const [{
19 className,
20 ...colProps
21 }] = (0, _Col.useCol)(props);
22 return {
23 ...colProps,
24 className: (0, _classnames.default)(className, animation ? `${bsPrefix}-${animation}` : bsPrefix, size && `${bsPrefix}-${size}`, bg && `bg-${bg}`)
25 };
26}
27module.exports = exports.default;
\No newline at end of file