├── .nvmrc
├── .prettierrc
├── .prettierignore
├── .yarn
└── .gitignore
├── manager.js
├── .storybook
├── preview-head.html
├── local-preset.js
├── main.ts
└── preview.tsx
├── .yarnrc.yml
├── media
├── screenshot.png
└── icon.svg
├── .gitignore
├── src
├── components
│ ├── index.ts
│ ├── badge-tooltip-wrapper.component.tsx
│ ├── badges.component.tsx
│ └── badge.component.tsx
├── index.ts
├── stories
│ ├── Button.mdx
│ ├── button.css
│ ├── Button.tsx
│ ├── Button.stories.tsx
│ └── assets
│ │ ├── direction.svg
│ │ ├── flow.svg
│ │ ├── code-brackets.svg
│ │ ├── comments.svg
│ │ ├── repo.svg
│ │ ├── plugin.svg
│ │ ├── stackalt.svg
│ │ └── colors.svg
├── locations
│ ├── sidebar
│ │ ├── index.tsx
│ │ └── sidebar.tsx
│ ├── toolbar-extra
│ │ └── index.tsx
│ └── toolbar
│ │ └── index.tsx
├── constants.ts
├── manager.tsx
├── typings.interface.ts
└── config.ts
├── vite.config.ts
├── tsup.config.ts
├── tsconfig.json
├── .github
└── workflows
│ └── release.yml
├── scripts
├── eject-typescript.mjs
├── prepublish-checks.mjs
└── welcome.js
├── LICENSE
├── package.json
├── README.md
└── CHANGELOG.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | v20.10.0
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | dist
2 |
--------------------------------------------------------------------------------
/.yarn/.gitignore:
--------------------------------------------------------------------------------
1 | install-state.gz
2 |
--------------------------------------------------------------------------------
/manager.js:
--------------------------------------------------------------------------------
1 | export * from "./dist/manager";
2 |
--------------------------------------------------------------------------------
/.storybook/preview-head.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | yarnPath: .yarn/releases/yarn-4.5.0.cjs
2 |
3 | nodeLinker: node-modules
4 |
--------------------------------------------------------------------------------
/media/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jimdrury/storybook-addon-badges/HEAD/media/screenshot.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 | storybook-static/
4 | build-storybook.log
5 | .DS_Store
6 | .env
7 | .idea
8 |
--------------------------------------------------------------------------------
/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './badges.component';
2 | export * from './badge.component';
3 | export * from './badge-tooltip-wrapper.component';
4 |
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vite";
2 | import react from "@vitejs/plugin-react";
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | });
8 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | // make it work with --isolatedModules
2 | export * from './constants';
3 | export * from './config';
4 |
5 | export type { TooltipConfig, BadgeConfig, BadgesConfig } from './typings.interface';
6 |
7 | export default {};
8 |
--------------------------------------------------------------------------------
/.storybook/local-preset.js:
--------------------------------------------------------------------------------
1 | /**
2 | * to load the built addon in this test Storybook
3 | */
4 |
5 | function managerEntries(entry = []) {
6 | return [...entry, require.resolve("../dist/manager.mjs")];
7 | }
8 |
9 | module.exports = {
10 | managerEntries,
11 | };
12 |
--------------------------------------------------------------------------------
/src/stories/Button.mdx:
--------------------------------------------------------------------------------
1 | import {Canvas, Meta} from '@storybook/blocks';
2 | import * as ButtonStories from "./Button.stories";
3 | import {BADGE} from "../constants";
4 |
5 |
6 |
7 |
8 | # Button
9 |
10 | This is an example of a button story
11 |
12 |