react-pdf-builder
Version:
Build beautiful PDF documents in React.
36 lines (35 loc) • 1.93 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CardWithImage = void 0;
const react_1 = __importDefault(require("react"));
const ThemedImage_1 = require("../../components/basics/ThemedImage");
const Card_1 = require("../../components/card/Card");
const CardBody_1 = require("../../components/card/CardBody");
const Heading6_1 = require("../../components/typography/Heading6");
const Paragraph_1 = require("../../components/typography/Paragraph");
const PDFStory_1 = require("../parts/PDFStory");
const StoryComponent = () => {
return (react_1.default.createElement(PDFStory_1.PDFStory, null,
react_1.default.createElement(Card_1.Card, null,
react_1.default.createElement(CardBody_1.CardBody, { className: "p-0" },
react_1.default.createElement(ThemedImage_1.ThemedImage, { className: "w-100 rounded-top", src: "https://justinmahar.github.io/react-pdf-builder/images/600x200.jpg" })),
react_1.default.createElement(CardBody_1.CardBody, null,
react_1.default.createElement(Heading6_1.Heading6, null, "Card with image"),
react_1.default.createElement(Paragraph_1.Paragraph, { className: "mb-0" }, "This card has two card bodies. The first is a card body with no padding and a 100% width placeholder image inside. The image has a top border radius (class name \"rounded-top\") to allow it to fit snugly within the card body. The second card body contains this text.")))));
};
// === Setup ===
const meta = {
title: 'Stories/Card', // <-- Set to your story title
component: StoryComponent,
parameters: {
options: { showPanel: false }, // Don't show addons panel
},
};
exports.default = meta;
// === Stories ===
exports.CardWithImage = {
args: {},
};
;