You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
508 B
19 lines
508 B
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}`)
|
|
};
|
|
} |