chore: rename composables folder

This commit is contained in:
chenjiahan
2020-11-16 11:41:46 +08:00
parent dc6330bcdc
commit 062cd546a9
60 changed files with 67 additions and 67 deletions

View File

@@ -0,0 +1,16 @@
import { useHeight } from './use-height';
import type { Ref } from 'vue';
import type { BEM } from '../utils/create/bem';
export function usePlaceholder(contentRef: Ref<Element>, bem: BEM) {
const height = useHeight(contentRef);
return (renderContent: () => JSX.Element) => (
<div
class={bem('placeholder')}
style={{ height: height.value ? `${height.value}px` : undefined }}
>
{renderContent()}
</div>
);
}