Files
TestMesa/backend/frontend/node_modules/react-bootstrap/esm/usePlaceholder.js
2024-12-17 13:23:11 -08:00

22 lines
527 B
JavaScript

"use client";
import classNames from 'classnames';
import { useBootstrapPrefix } from './ThemeProvider';
import { useCol } from './Col';
export default function usePlaceholder({
animation,
bg,
bsPrefix,
size,
...props
}) {
bsPrefix = useBootstrapPrefix(bsPrefix, 'placeholder');
const [{
className,
...colProps
}] = useCol(props);
return {
...colProps,
className: classNames(className, animation ? `${bsPrefix}-${animation}` : bsPrefix, size && `${bsPrefix}-${size}`, bg && `bg-${bg}`)
};
}