diff --git a/sensiolabs/storybook-bundle/0.1/config/packages/storybook.yaml b/sensiolabs/storybook-bundle/0.1/config/packages/storybook.yaml new file mode 100644 index 00000000..d2c301d0 --- /dev/null +++ b/sensiolabs/storybook-bundle/0.1/config/packages/storybook.yaml @@ -0,0 +1,5 @@ +when@dev: + storybook: + sandbox: + allowedFunctions: + - 'dump' diff --git a/sensiolabs/storybook-bundle/0.1/config/routes/storybook.yaml b/sensiolabs/storybook-bundle/0.1/config/routes/storybook.yaml new file mode 100644 index 00000000..ecb526b1 --- /dev/null +++ b/sensiolabs/storybook-bundle/0.1/config/routes/storybook.yaml @@ -0,0 +1,2 @@ +storybook: + resource: '@StorybookBundle/config/routes.php' diff --git a/sensiolabs/storybook-bundle/0.1/manifest.json b/sensiolabs/storybook-bundle/0.1/manifest.json new file mode 100644 index 00000000..e5adb45d --- /dev/null +++ b/sensiolabs/storybook-bundle/0.1/manifest.json @@ -0,0 +1,16 @@ +{ + "bundles": { + "Storybook\\StorybookBundle": ["all"] + }, + "gitignore": [ + "/node_modules" + ], + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "stories/": "stories/", + "templates/": "templates/" + }, + "conflict": { + "symfony/framework-bundle": "<6.4" + } +} diff --git a/sensiolabs/storybook-bundle/0.1/post-install.txt b/sensiolabs/storybook-bundle/0.1/post-install.txt new file mode 100644 index 00000000..df1e4830 --- /dev/null +++ b/sensiolabs/storybook-bundle/0.1/post-install.txt @@ -0,0 +1,8 @@ + + What's next? + + + * Run your application: + 1. Initialize Storybook in your project: bin/console storybook:init command; + - This will create basic configuration files and add required dependencies to your package.json. + 2. Follow the instructions provided by the storybook:init command diff --git a/sensiolabs/storybook-bundle/0.1/stories/Components.stories.js b/sensiolabs/storybook-bundle/0.1/stories/Components.stories.js new file mode 100644 index 00000000..2721a961 --- /dev/null +++ b/sensiolabs/storybook-bundle/0.1/stories/Components.stories.js @@ -0,0 +1,24 @@ +import {twig} from "@sensiolabs/storybook-symfony-webpack5"; + +export default { + component: twig` +
Hello {{ name }}!
+ `, + args: { + name: 'World' + } +} + +export const Default = {}; + +export const John = { + args: { + name: 'John' + } +}; + +export const Jane = { + args: { + name: 'Jane' + } +}; diff --git a/sensiolabs/storybook-bundle/0.1/templates/bundles/StorybookBundle/Preview.html.twig b/sensiolabs/storybook-bundle/0.1/templates/bundles/StorybookBundle/Preview.html.twig new file mode 100644 index 00000000..b61728e9 --- /dev/null +++ b/sensiolabs/storybook-bundle/0.1/templates/bundles/StorybookBundle/Preview.html.twig @@ -0,0 +1 @@ +{% extends '@!Storybook/preview.html.twig' %}