Skip to content

Commit

Permalink
Add Storybook manager and theme configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kingRayhan committed Dec 28, 2023
1 parent 5a4492f commit 29bfbc7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { addons } from "@storybook/manager-api";
import theme from "./theme";

addons.setConfig({ theme });
6 changes: 6 additions & 0 deletions .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { create } from "@storybook/theming/create";

export default create({
base: "dark",
brandTitle: "@graphland/react-video-player",
});
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
"@storybook/addon-links": "^7.6.6",
"@storybook/addon-onboarding": "^1.0.10",
"@storybook/blocks": "^7.6.6",
"@storybook/manager-api": "^7.6.6",
"@storybook/react": "^7.6.6",
"@storybook/react-webpack5": "^7.6.6",
"@storybook/test": "^7.6.6",
"@storybook/theming": "^7.6.6",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"react": "^18.2.0",
Expand Down
7 changes: 4 additions & 3 deletions stories/VideoPlayer.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { VideoPlayer } from "../src";
import { VideoPlayerProps } from "../src/VideoPlayer";

// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
const meta = {
const meta: Meta = {
title: "VideoPlayer",
component: VideoPlayer,
parameters: {
Expand All @@ -22,8 +22,9 @@ export default meta;
type Story = StoryObj<typeof meta>;

const DEFAULT_ARGS: VideoPlayerProps = {
height: 1080,
width: 1920,
height: 400,
width: 600,
isFluid: true,
sources: [
{
src: "https://media.w3.org/2010/05/sintel/trailer_hd.mp4",
Expand Down

0 comments on commit 29bfbc7

Please sign in to comment.