Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f45e4b

Browse files
2 parentsbeec581 +e058581 commit0f45e4b

File tree

9 files changed

+48
-26
lines changed

9 files changed

+48
-26
lines changed

‎.storybook/addons.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import'@storybook/addon-actions/register'
22
import'@storybook/addon-links/register'
33
import'@storybook/addon-options/register'
4+
import'@storybook/addon-knobs/register'

‎.storybook/config.js‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
import{configure,setAddon,addDecorator}from'@storybook/vue';
22
import{setOptions}from'@storybook/addon-options';
3+
import{withKnobs}from'@storybook/addon-knobs/vue';
34
importVueInfoAddonfrom'storybook-addon-vue-info';
45
importVuefrom'vue';
56
importCarvuefrom'../components';
67

8+
functioncodeHighlight(storyFn){
9+
varoptions=storyFn();
10+
return{
11+
mounted(){
12+
if(window.hljs)window.hljs.highlightBlock(document.querySelector("code"));
13+
},
14+
...options,
15+
render:function(h){
16+
returnh(options)
17+
}
18+
};
19+
};
20+
21+
addDecorator(codeHighlight);
22+
723
addDecorator(VueInfoAddon);
824

25+
addDecorator(withKnobs);
26+
927
Vue.config.productionTip=false;
1028

1129
Vue.use(Carvue);

‎.storybook/preview-head.html‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
<linktype="text/css"rel="stylesheet"href="https://nicholaslee119.github.io/carbon-components-vue/static/styles/atom-one-dark.css">
2-
<scripttype="application/javascript"src="https://nicholaslee119.github.io/carbon-components-vue/static/highlight.pack.js"></script>
3-
<script>
4-
document.addEventListener("DOMContentLoaded",function(event){
5-
hljs.highlightBlock(document.querySelector("code"));
6-
});
7-
</script>
2+
<scripttype="application/javascript"src="https://nicholaslee119.github.io/carbon-components-vue/static/highlight.pack.js"></script>

‎.travis.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ node_js:
44

55
after_success:
66
-npm i coveralls
7-
-cat ./test/unit/coverage/lcov.info | coveralls
7+
-cat ./test/unit/coverage/lcov.info | coveralls
8+
9+
deploy:
10+
provider:pages
11+
skip-cleanup:true
12+
github-token:$GITHUB_TOKEN
13+
keep-history:true
14+
on:
15+
branch:master

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"devDependencies": {
2626
"@storybook/addon-actions":"^3.3.15",
2727
"@storybook/addon-centered":"^3.3.15",
28+
"@storybook/addon-knobs":"^3.3.15",
2829
"@storybook/addon-links":"^3.3.15",
2930
"@storybook/addon-options":"^3.3.15",
3031
"@storybook/addons":"^3.3.15",

‎stories/breadcrumb.stories.js‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import{storiesOf}from'@storybook/vue';
2+
import{boolean}from'@storybook/addon-knobs/vue';
23

34
storiesOf('Breadcrumb',module)
45
.add('Default',()=>({
@@ -9,12 +10,15 @@ storiesOf('Breadcrumb', module)
910
<ca-breadcrumb-item>3</ca-breadcrumb-item>
1011
</ca-breadcrumb>
1112
`,
12-
})).add('without last Slash',()=>({
13-
template:`
14-
<ca-breadcrumb noSlash>
15-
<ca-breadcrumb-item href="#">1</ca-breadcrumb-item>
16-
<ca-breadcrumb-item>2</ca-breadcrumb-item>
17-
<ca-breadcrumb-item>3</ca-breadcrumb-item>
18-
</ca-breadcrumb>
19-
`,
20-
}));
13+
})).add('without last Slash',()=>{
14+
constnoSlash=boolean('noSlash',false);
15+
return{
16+
template:`
17+
<ca-breadcrumb :noSlash="${noSlash}">
18+
<ca-breadcrumb-item href="#">1</ca-breadcrumb-item>
19+
<ca-breadcrumb-item>2</ca-breadcrumb-item>
20+
<ca-breadcrumb-item>3</ca-breadcrumb-item>
21+
</ca-breadcrumb>
22+
`,
23+
};
24+
});

‎stories/search.stories.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ storiesOf('Search', module)
77
`,
88
})).add('with model',()=>({
99
data:()=>({
10-
inputValue:'test'
10+
inputValue:'test',
1111
}),
1212
template:`
13-
<div>
13+
<ca-tile>
1414
<ca-search v-model="inputValue"></ca-search>
1515
{{inputValue}}
16-
</div>
16+
</ca-tile>
1717
`,
1818
}));

‎storybook-static/iframe.html‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414
<title>Storybook</title>
1515
<linktype="text/css"rel="stylesheet"href="https://nicholaslee119.github.io/carbon-components-vue/static/styles/atom-one-dark.css">
1616
<scripttype="application/javascript"src="https://nicholaslee119.github.io/carbon-components-vue/static/highlight.pack.js"></script>
17-
<script>
18-
document.addEventListener("DOMContentLoaded",function(event){
19-
hljs.highlightBlock(document.querySelector("code"));
20-
});
21-
</script>
2217
</head>
2318
<body>
2419
<divid="root"></div>
2520
<divid="error-display"></div>
26-
<scripttype="text/javascript"src="static/preview.fd0d402b2c104339517e.bundle.js"></script></body>
21+
<scripttype="text/javascript"src="static/preview.a8c8ea67cd9e922e8855.bundle.js"></script></body>
2722
</html>

‎storybook-static/static/preview.fd0d402b2c104339517e.bundle.js‎renamed to ‎storybook-static/static/preview.a8c8ea67cd9e922e8855.bundle.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp