Page MenuHomec4science

usePlaceholder.js
No OneTemporary

File Metadata

Created
Wed, Jul 23, 08:21

usePlaceholder.js

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}`)
};
}

Event Timeline