0.3.1 • Published 4 months ago

@googleworkspace/card-dev-assist v0.3.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

@googleworkspace/card-dev-assist

npm version NPM Downloads GitHub Issues or Pull Requests GitHub last commit GitHub License Test Release

A utility library for generating previews of Google card components. This package provides tools to render and visualize card cards, making it easier to develop and test Google Workspace Add-ons.

Features

  • Generate image previews of card cards
  • Easy to integrate into testing and development workflows
  • Helps ensure visual consistency and correctness of UI components

Usage

The primary function getScreenshot allows you to convert a card card object into a PNG image.

import { getScreenshot } from "@googleworkspace/card-dev-assist";

const card = {
  action: {
    link: {
      url: "https://www.example.com",
    },
  },
  widgets: [
    {
      text: {
        content: "Hello, world!",
      },
    },
  ],
};

const base64Data = await getScreenshot(card);
0.3.1

4 months ago

0.3.0

4 months ago

0.2.3

4 months ago

0.2.2

4 months ago

0.2.1

4 months ago

0.2.0

4 months ago