summaryrefslogtreecommitdiffstats
path: root/src/ui/objects/PlaceholderBox.tsx
blob: d64866fa844841305a382bc920f40112c4aac8bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import type { HTMLTag, Polymorphic } from "corvos/plugins/jsx.ts";

export type Props<Tag extends HTMLTag> = Polymorphic<{
	as: Tag;
}>;

export const PlaceholderBox = <T extends HTMLTag = "div">({
	as: Tag = "div" as T,
	class: cls,
	...props
}: Props<T>) => <Tag class:list={["o-placeholder-box u-ta-center u-c-mute", cls]} {...props} />;