UNPKG

lincd-design-elems

Version:

25 lines 1.28 kB
import React from 'react'; // import "./Card.scss"; // import {default as style} from "./Card.scss.json"; import { useStyles } from 'lincd/utils/Hooks'; const CardHeader = (props) => { let styleProps = useStyles(props, 'text-lg font-semibold text-gray-800 dark:text-white pb-2'); return React.createElement("h1", { ...styleProps }, props.children); }; const CardContent = (props) => { return (React.createElement("div", { className: "pb-2 text-gray-700 dark:text-gray-400" }, props.children)); }; //from https://merakiui.com/components/1656817c-bc16-4cce-85ba-385502c38d40/preview export const Card = (props) => { return (React.createElement("div", { className: "w-full max-w-sm overflow-hidden bg-white rounded-lg shadow-lg dark:bg-gray-800" }, props.imageSrc && (React.createElement("div", { className: "object-cover object-center w-full h-56 bg-cover bg-top", style: { backgroundImage: `url(${props.imageSrc})`, ...props.imageStyle, }, title: props.imageAlt })), React.createElement("div", { className: "px-6 py-4" }, props.children))); }; Card.Content = CardContent; Card.Header = CardHeader; //register all components in this file // registerPackageModule({Card}); //# sourceMappingURL=Card.js.map