Closed kriss145 closed 7 years ago
Sorry for the late response, I was at a conference all week.
If I understand the question correctly, you want to know how to use a tag in the handlebars markup that generates the style guide. Is that correct?
If so, let's say your comment looks like this:
/**
* A simple Button.
* @section Buttons
* @example <button>Click Me</button>
* @customTag Hello World
*/
This would generate a context object like so:
{
"sections": [{
"name": "Buttons",
"description": "<p>A simple Button.</p>",
"example": {
"description": "<button>Click me</button>",
"type": "markup"
},
"customTag": "Hello World"
}]
}
Then in handlebars you would do this:
{{#each sections}}
<h1>{{name}}</h1>
{{{description}}}
<div>{{{example.description}}}</div>
<div>{{customTag}}</div>
{{/each}}
@straker Thanks! Now I know everything.
Awesome. I'll go ahead and add this to the README later tonight so ti's more readily available.
Hi,
How we can use tags in our styleguide? In documentation we have examples how generating but I don't see example how to use.
Could you help?