Skip to content

Commit

Permalink
fix: add manager.js entry point, fix doc container style
Browse files Browse the repository at this point in the history
  • Loading branch information
lmestel committed Sep 28, 2023
1 parent 467ebd5 commit e066e72
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config: StorybookConfig = {
"../stories/**/*.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: ["../preset.js", "@storybook/addon-essentials"],
addons: ["@storybook/addon-essentials", "../manager.js"],
framework: {
name: '@storybook/react-vite',
options: {}
Expand Down
2 changes: 1 addition & 1 deletion bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { nodeExternalsPlugin } = require("esbuild-node-externals");

/** @type import("esbuild").BuildOptions */
const sharedConfig = {
entryPoints: ["src/index.ts", "src/preset/manager.ts"],
entryPoints: ["src/index.ts", "src/manager.ts"],
bundle: true,
platform: "browser",
format: "esm",
Expand Down
1 change: 1 addition & 0 deletions manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./dist/esm/manager";
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"module": "dist/esm/index.js",
"types": "dist/ts/index.d.ts",
"files": [
"dist"
"dist", "manager.js"
],
"scripts": {
"clean": "rimraf ./dist",
Expand All @@ -29,7 +29,7 @@
"prepare": "patch-package",
"build": "yarn buildJs && yarn buildTsc",
"test": "echo \"Error: no test specified\" && exit 1",
"storybook": "storybook dev -p 6006",
"storybook": "storybook dev -p 6007",
"start": "yarn build && yarn storybook",
"build-storybook": "storybook build",
"release": "yarn build && auto shipit"
Expand Down
12 changes: 0 additions & 12 deletions preset.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ interface PanelProps {
}

const PanelContainer = styled.div`
position: absolute;
inset: 0;
> div {
height: 100%;
}
Expand Down
4 changes: 2 additions & 2 deletions src/preset/manager.ts → src/manager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { addons, types } from "@storybook/manager-api";

import { ADDON_ID, PANEL_ID } from "../constants";
import { Panel } from "../Panel";
import { ADDON_ID, PANEL_ID } from "./constants";
import { Panel } from "./Panel";

addons.register(ADDON_ID, () => {
addons.add(PANEL_ID, {
Expand Down

0 comments on commit e066e72

Please sign in to comment.