# storybook-addon-discussion

> Leave comments for components and documentations

Latest version **0.1.6** (published 2023-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install storybook-addon-discussion
pnpm add storybook-addon-discussion
yarn add storybook-addon-discussion
bun add storybook-addon-discussion
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2023-10-15 |
| First published | 2023-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 109.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hamed-farag |
| Maintainers | hamed-farag |
| Keywords | discussion, comments, supabase, storybook-addons, appwrite.io |

## Links

- npm: https://www.npmjs.com/package/storybook-addon-discussion
- Repository: https://github.com/hamed-farag/storybook-addon-discussion
- Homepage: https://github.com/hamed-farag/storybook-addon-discussion#readme
- Issues: https://github.com/hamed-farag/storybook-addon-discussion/issues
- npm.io page: https://npm.io/package/storybook-addon-discussion

## Dependencies (4)

- [yup](https://npm.io/package/yup.md) ^1.3.2
- [supabase](https://npm.io/package/supabase.md) ^1.100.1
- [ts-dedent](https://npm.io/package/ts-dedent.md) 2.2.0
- [@supabase/supabase-js](https://npm.io/package/@supabase/supabase-js.md) ^2.38.0

## Recent versions

- 0.1.6 (latest) — 2023-10-15
- 0.1.7--canary.7328668.0 (canary) — 2023-10-23
- 0.1.5 — 2023-10-14
- 0.1.4 — 2023-10-13
- 0.1.3 — 2023-10-12
- 0.1.2 — 2023-10-12
- 0.1.1 — 2023-10-12

## README

# Storybook Addon Storybook Discussion
Leave comments for components and MDX documents based on [addon-kit](https://github.com/storybookjs/addon-kit), comments are saved on [supabase](https://supabase.com/) database.

### Usage

#### Installation

```
npm install -D storybook-addon-discussion
```

#### Configuration

```ts
// .storybook/main.ts

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

```ts
// .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;
```

```sql
-- 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
  );
```

---
_Source: https://npm.io/package/storybook-addon-discussion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
