nej-react-components/Parts/Card.js
honzapatCZ 79aa7a4eb0 init
2021-03-24 22:27:46 +01:00

17 lines
660 B
JavaScript

import React from "react";
export default function Card(props) {
return <div {...props} className={"relative flex flex-col min-w-0 break-words bg-primary w-full shadow-xl rounded-2xl " + (props.className ?? "")}>
{props.children}
</div>;
}
export function CardHeader(props) {
return <div className="rounded-t px-6 py-4 pb-2 bg-transparent">
<div className="flex flex-wrap items-center">
<div className="relative w-full max-w-full flex-grow flex-1">
{ props.desc != null ? <h2 className="text-primary text-xl font-semibold">{props.desc}</h2> : ""}
</div>
{props.children}
</div>
</div>;
}