1.0.2 • Published 11 months ago

gist-react v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

gist-react

Embed the gist anywhere in your latest React project.

Table of Contents

Overview

gist-react helps you embed gists more conveniently in React(include Gatsby, Next.js, etc) environments.

Features

  • Supports the latest React - Uses the latest version of the React API.
  • Written in TypeScript.
  • Convenient embedding method.

Getting Started

You can use the component as follows:

Basic Usage

import { Gist } from 'gist-react';

const gistId = 'abcdefg';

const App = () => {
  return <Gist gistId={gistId} />;
};

When there are multiple files in a gist

If there are multiple files in a gist, all files will be exposed in the component by only entering the gistId. If you want to embed only one file among multiple files, you can enter the filename.

import { Gist } from 'gist-react';

const gistId = 'abcdefg';
const file = 'file.js';

const App = () => {
  return <Gist gistId={gistId} file={file} />;
};

Prerequisites

To make the package work properly, you need React 16.8 or higher that supports react hooks.

Installation

yarn add gist-react # install

yarn build # build

Contributing

If you encounter any issues, you can raise them using GitHub issues.

License

License This project is licensed under the MIT License.

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.0.14

11 months ago

0.0.13

11 months ago

0.0.12

11 months ago

0.0.11

11 months ago

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago