Skip to content

Commit 4f1e741

Browse files
authored
Merge pull request #28 from mapcomponents/remove-stories.json
Remove stories.json
2 parents 245fc00 + 4349cd1 commit 4f1e741

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

public/schema/metadata.schema.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
"type": "string"
3333
}
3434
},
35-
"required": ["title", "description"]
35+
"required": [
36+
"title",
37+
"description"
38+
]
3639
}
3740
}
3841
},
@@ -53,6 +56,21 @@
5356
},
5457
"type": {
5558
"type": "string"
59+
},
60+
"demos": {
61+
"type": "array",
62+
"items": {
63+
"type": "object",
64+
"properties": {
65+
"name": {
66+
"type": "string"
67+
},
68+
"url": {
69+
"type": "string"
70+
}
71+
},
72+
"required": ["name", "url"]
73+
}
5674
}
5775
},
5876
"required": [
@@ -62,7 +80,8 @@
6280
"i18n",
6381
"tags",
6482
"category",
65-
"type"
83+
"type",
84+
"demos"
6685
]
6786
}
6887
}

src/components/DemoContextProvider.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ const DemoContextProvider = ({ children }) => {
4747
*/
4848

4949
const applyStorybookDataToMcMeta = ({
50-
componentData,
51-
storybookData,
52-
compId,
53-
url,
54-
}) => {
50+
componentData,
51+
storybookData,
52+
compId,
53+
url,
54+
}) => {
5555
let catalogueDemoExists = false;
5656
for (var storyId in storybookData.stories) {
5757
let _compName = storybookData.stories[storyId].kind.split("/");

0 commit comments

Comments
 (0)