react-layout-timbel
Version:
모던한 React 컴포넌트 라이브러리입니다. Layout, Card, Button 컴포넌트를 포함합니다.
11 lines • 851 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
export const Card = ({ title, children, imageUrl, imageAlt = 'Card image', theme = 'light', size = 'medium', shadow = true, onClick, clickable = false }) => {
const handleClick = () => {
if (clickable && onClick) {
onClick();
}
};
return (_jsxs("div", { className: `card ${theme} ${size} ${shadow ? 'shadow' : ''} ${clickable ? 'clickable' : ''}`, onClick: handleClick, children: [imageUrl && (_jsx("div", { className: "card-image", children: _jsx("img", { src: imageUrl, alt: imageAlt }) })), _jsxs("div", { className: "card-content", children: [title && _jsx("h3", { className: "card-title", children: title }), _jsx("div", { className: "card-body", children: children })] })] }));
};
//# sourceMappingURL=index.js.map