blob: aa5df3d0856179acd78626e3ec21e444772d755b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import type { HTMLTag, Polymorphic } from "corvos/plugins/jsx.ts";
export type Props<Tag extends HTMLTag> = Polymorphic<{
"as"?: Tag;
"list"?: boolean;
"main"?: boolean;
"no-mbs-neutralize"?: boolean;
"children"?: JSX.Element;
}>;
export const CardBody = <T extends HTMLTag = "div">({
as: Tag = "div" as T,
list,
main,
"no-mbs-neutralize": noMbsNeutralize,
class: cls,
...props
}: Props<T>) => (
<Tag
class:list={[
"o-card__body",
{
"o-card__body--main": main,
"o-card__header": Tag === "summary",
"l-card-list__card-body": list,
"o-card__body--no-mbs-neutralize": noMbsNeutralize,
},
cls,
]}
{...props}
/>
);
|