Last active
June 1, 2019 09:47
-
-
Save jensgro/9f515b676ef2e75891ddb17b69192387 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module.exports = | |
content = [ | |
{ | |
"color": "primary", | |
"label": "primary Button" | |
}, | |
{ | |
"color": "secondary", | |
"label": "secondary Button" | |
}, | |
{ | |
"color": "success", | |
"label": "success Button" | |
}, | |
{ | |
"color": "info", | |
"label": "info Button" | |
}, | |
{ | |
"color": "warning", | |
"label": "warning Button" | |
}, | |
{ | |
"color": "danger", | |
"label": "danger Button" | |
}, | |
{ | |
"color": "light", | |
"label": "light Button" | |
}, | |
{ | |
"color": "dark", | |
"label": "darkButton" | |
}, | |
{ | |
"color": "link", | |
"label": "link Button" | |
} | |
] | |
This file contains hidden or 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
<a href="#" class="btn btn-{{ color }}">{{ label }}</a> |
This file contains hidden or 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
module.exports = [ | |
{ | |
"color": "primary", | |
"label": "primary Button" | |
}, | |
{ | |
"color": "secondary", | |
"label": "secondary Button" | |
}, | |
{ | |
"color": "success", | |
"label": "success Button" | |
}, | |
{ | |
"color": "info", | |
"label": "info Button" | |
}, | |
{ | |
"color": "warning", | |
"label": "warning Button" | |
}, | |
{ | |
"color": "danger", | |
"label": "danger Button" | |
}, | |
{ | |
"color": "light", | |
"label": "light Button" | |
}, | |
{ | |
"color": "dark", | |
"label": "darkButton" | |
}, | |
{ | |
"color": "link", | |
"label": "link Button" | |
} | |
] | |
This file contains hidden or 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
{ | |
"content" : [ | |
{ | |
"color": "primary", | |
"label": "primary Button" | |
}, | |
{ | |
"color": "secondary", | |
"label": "secondary Button" | |
}, | |
{ | |
"color": "success", | |
"label": "success Button" | |
}, | |
{ | |
"color": "info", | |
"label": "info Button" | |
}, | |
{ | |
"color": "warning", | |
"label": "warning Button" | |
}, | |
{ | |
"color": "danger", | |
"label": "danger Button" | |
}, | |
{ | |
"color": "light", | |
"label": "light Button" | |
}, | |
{ | |
"color": "dark", | |
"label": "darkButton" | |
}, | |
{ | |
"color": "link", | |
"label": "link Button" | |
} | |
] | |
} | |
This file contains hidden or 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
{% for item in content %} | |
<a href="#" class="btn btn-{{ item.color }}">{{ item.label }}</a> | |
{% endfor %} |
Wenn ich aus "content":
einfach content =
mache, ist das syntaktisch korrekt, der Styleguide wird erzeugt, aber ich sehe keinen einzigen Button, der aus dem Array erzeugt werden sollte.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bei funktioniert-nicht.json wird ein "unexpected token" angemeckert, der Doppelpunkt:
`
button.data.js:2
"content" : [
^
SyntaxError: Unexpected token :
at createScript (vm.js:80:10)
`