@myriaddreamin/typst.solid

0.5.0-rc9 • Public • Published

@myriaddreamin/typst.solid

Usage

import { TypstDocument } from "@myriaddreamin/typst.solid";
import { createResource } from "solid-js";

export const App = (artifact: Uint8Array) => {
  const getArtifactData = async () => {
    const response = await fetch(
      "http://localhost:3000/readme.artifact.sir.in"
    ).then((response) => response.arrayBuffer());

    return new Uint8Array(response);
  };
  const [vec] = createResource(getArtifactData);

  return (
    <div>
      <h1>Demo: Embed Your Typst Document in Solid </h1>
      <TypstDocument fill="#343541" artifact={vec()} />
    </div>
  );
};

Documentation

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.0-rc97latest

Version History

VersionDownloads (Last 7 Days)Published
0.5.0-rc97

Package Sidebar

Install

npm i @myriaddreamin/typst.solid

Weekly Downloads

7

Version

0.5.0-rc9

License

none

Unpacked Size

7.36 kB

Total Files

4

Last publish

Collaborators

  • myriaddreamin