UNPKG

527 BJavaScriptView Raw
1"use client";
2
3import classNames from 'classnames';
4import { useBootstrapPrefix } from './ThemeProvider';
5import { useCol } from './Col';
6export default function usePlaceholder({
7 animation,
8 bg,
9 bsPrefix,
10 size,
11 ...props
12}) {
13 bsPrefix = useBootstrapPrefix(bsPrefix, 'placeholder');
14 const [{
15 className,
16 ...colProps
17 }] = useCol(props);
18 return {
19 ...colProps,
20 className: classNames(className, animation ? `${bsPrefix}-${animation}` : bsPrefix, size && `${bsPrefix}-${size}`, bg && `bg-${bg}`)
21 };
22}
\No newline at end of file