0.1.6 • Published 7 months ago

storybook-addon-discussion v0.1.6

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

Storybook Addon Storybook Discussion

Leave comments for components and MDX documents based on addon-kit, comments are saved on supabase database.

Usage

Installation

npm install -D storybook-addon-discussion

Configuration

// .storybook/main.ts

const config: StorybookConfig = {
  ...
  addons: [
    ...
    "storybook-addon-discussion"
  ],
  ...
};
export default config;
// .storybook/preview.ts

import type { Preview } from "@storybook/react";

const preview: Preview = {
  parameters: {
    ...
    discussion: {
      supabase: {
        url: "SUPABASE_PROJECT_URL", // example: https://YOUR_PROJECT_UNIQUE_ID.supabase.co
        secret: "PROJECT_API_PUBLIC_KEY",
      },
    },
  },
};

export default preview;
-- Create Query for comments table (comments_v1)
-- Execute this query on Supabase SQL Editor

create table
  comments_v1 (
    id bigint generated by default as identity primary key,
    author varchar(50) not null,
    comment text not null,
    storyId varchar(150) not null,
    createdAt timestamp not null
  );
0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago