mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-20 11:56:25 +03:00
[SensioLabs/Storybook-Bundle] create 0.1 recipe (#1623)
* [SensioLabs/Storybook-Bundle] create 0.1 recipe * fix newline file requirements * fix yaml standards * fix yaml standards for bundle config * recipe only for Symfony 7 and up * add gitignore setup * update conflict statement
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
when@dev:
|
||||
storybook:
|
||||
sandbox:
|
||||
allowedFunctions:
|
||||
- 'dump'
|
||||
@@ -0,0 +1,2 @@
|
||||
storybook:
|
||||
resource: '@StorybookBundle/config/routes.php'
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<bg=blue;fg=white> </>
|
||||
<bg=blue;fg=white> What's next? </>
|
||||
<bg=blue;fg=white> </>
|
||||
|
||||
* <fg=blue>Run</> your application:
|
||||
1. Initialize Storybook in your project: <comment>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
|
||||
@@ -0,0 +1,24 @@
|
||||
import {twig} from "@sensiolabs/storybook-symfony-webpack5";
|
||||
|
||||
export default {
|
||||
component: twig`
|
||||
<div>Hello {{ name }}!</div>
|
||||
`,
|
||||
args: {
|
||||
name: 'World'
|
||||
}
|
||||
}
|
||||
|
||||
export const Default = {};
|
||||
|
||||
export const John = {
|
||||
args: {
|
||||
name: 'John'
|
||||
}
|
||||
};
|
||||
|
||||
export const Jane = {
|
||||
args: {
|
||||
name: 'Jane'
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{% extends '@!Storybook/preview.html.twig' %}
|
||||
Reference in New Issue
Block a user