-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
15,137 additions
and
21,825 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
module.exports = { | ||
stories: ['../story.js'], | ||
addons: ['@storybook/addon-actions/register'] | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions" | ||
], | ||
"framework": "@storybook/react" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from "react"; | ||
|
||
import Reader from "../.."; | ||
|
||
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export | ||
export default { | ||
title: "Reader", | ||
component: Reader, | ||
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes | ||
|
||
args: { | ||
constraints: { audio: false, video: true }, | ||
resolution: 640, | ||
}, | ||
|
||
argTypes: { | ||
constraints: { | ||
type: { name: "object", required: false }, | ||
description: "MediaTrackConstraints", | ||
table: { | ||
type: { summary: "object" }, | ||
defaultValue: { summary: "{ audio: false, video: true }" }, | ||
}, | ||
control: "object", | ||
}, | ||
|
||
resolution: { | ||
type: { name: "number", required: false }, | ||
description: "Resolution of procesed images, impacts performance.", | ||
table: { | ||
type: { summary: "number" }, | ||
defaultValue: { summary: 640 }, | ||
}, | ||
control: { type: "number", min: 320, max: 1280, step: 10 }, | ||
}, | ||
|
||
onScan: { | ||
action: "Scan", | ||
description: "Fired after each processed snapshot.", | ||
table: { | ||
type: { summary: "function" }, | ||
defaultValue: { summary: "(result) => {}" }, | ||
}, | ||
}, | ||
onLoad: { | ||
action: "Loaded", | ||
description: "Fired after camera is loaded and started processing stream.", | ||
table: { | ||
type: { summary: "function" }, | ||
defaultValue: { summary: "() => {}" }, | ||
}, | ||
}, | ||
onError: { | ||
action: "Error", | ||
description: "Fired if any error occures.", | ||
table: { | ||
type: { summary: "function" }, | ||
defaultValue: { summary: "(error) => {}" }, | ||
}, | ||
} | ||
}, | ||
}; | ||
|
||
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args | ||
const Template = (args) => <Reader {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = {}; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"generatedAt":1661342139593,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"8.13.2"},"storybookVersion":"6.5.10","language":"javascript","storybookPackages":{"@storybook/addon-actions":{"version":"6.5.10"},"@storybook/builder-webpack4":{"version":"6.5.10"},"@storybook/manager-webpack4":{"version":"6.5.10"},"@storybook/react":{"version":"6.5.10"},"@storybook/testing-library":{"version":"0.0.13"}},"framework":{"name":"react"},"addons":{"@storybook/addon-links":{"version":"6.5.10"},"@storybook/addon-essentials":{"version":"6.5.10"},"@storybook/addon-interactions":{"version":"6.5.10"}}} |