I’m using Storybook 8.4.7 with server-webpack5 8.4.7 to serve JinjaX components.
It works well except that it seems to not interpret a specific content
argument.
My story looks like this:
{
"title": "Components/Actionables/Button",
"parameters": {
"server": { "id": "actionables/button/Button" }
},
"args": {
"label": "Button",
"content": "foobar",
},
"argTypes": {
"label": { "control": "text" },
"content": { "control": "text" },
},
"stories": [
{
"name": "Default"
}
]
}
and my Jinja component look like this:
{#def label, content#}
<button
type="button"
class="button | d-inline-flex ai-center va-top"
>
{{ label }} {{ content }}
</button>
And I get this result:
Storybook seems to see the argument and send it to the rendering server (see the iframe’s URL params) but the text from the content
is not displayed (and obviously not in the DOM as well, it’s not just hidden).
The thing is if I rename it to pretty much anything else than content
it works fine.
But I can’t rename it, it must be exactly content
for it to work with JinjaX.
Somehow I think that this argument must be reserved for something else but I don’t know if I can bypass it.
Any clue?