0.1.2 • Published 5 months ago

@googleworkspace/uikit-dev-assist v0.1.2

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

@googleworkspace/uikit-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 UIkit components. This package provides tools to render and visualize UIkit cards, making it easier to develop and test Google Workspace Add-ons.

Features

  • Generate image previews of UIkit 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 UIkit card object into a PNG image.

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

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

const base64Data = await getScreenshot(card);
0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago