@@ -131,6 +131,20 @@ const {
131131 },
132132)
133133
134+ const playgroundLinks = computed (() => [
135+ ... readmeData .value .playgroundLinks ,
136+ ... (packageJson .value ?.storybook
137+ ? [
138+ {
139+ url: packageJson .value .storybook .url ,
140+ provider: ' storybook' ,
141+ providerName: ' Storybook' ,
142+ label: ' Storybook' ,
143+ },
144+ ]
145+ : []),
146+ ])
147+
134148// copy README file as Markdown
135149const { copied : copiedReadme, copy : copyReadme } = useClipboard ({
136150 source : () => ' ' ,
@@ -186,9 +200,7 @@ const {
186200 immediate: false ,
187201 },
188202)
189- onMounted (() => {
190- fetchInstallSize ()
191- })
203+ onMounted (() => fetchInstallSize ())
192204
193205const { data : skillsData } = useLazyFetch <SkillsListResponse >(
194206 () => {
@@ -805,6 +817,15 @@ const showSkeleton = shallowRef(false)
805817 >
806818 {{ $t('package.links.code') }}
807819 </LinkBase >
820+ <LinkBase
821+ v-if =" packageJson?.storybook"
822+ variant =" button-secondary"
823+ :to =" { name: 'stories', params: { path: [pkg.name, 'v', resolvedVersion] } }"
824+ aria-keyshortcuts =" ."
825+ classicon =" i-carbon:code"
826+ >
827+ stories
828+ </LinkBase >
808829 <LinkBase
809830 variant =" button-secondary"
810831 :to =" { name: 'compare', query: { packages: pkg.name } }"
@@ -1385,23 +1406,7 @@ const showSkeleton = shallowRef(false)
13851406 />
13861407
13871408 <!-- Playground links -->
1388- <PackagePlaygrounds
1389- v-if =" readmeData?.playgroundLinks?.length"
1390- :links =" readmeData.playgroundLinks"
1391- />
1392-
1393- <!-- <StorybookPlaygrounds
1394- v-if="readmeData?.storybookPlaygrounds?.length"
1395- :links="readmeData.storybookPlaygroundLinks"
1396- /> -->
1397-
1398- <a v-if =" packageJson?.storybook" :href =" packageJson.storybook.url" >storybook</a >
1399- <a
1400- v-if =" packageJson?.storybook"
1401- :href =" `/package-stories/${pkg.name}/v/${resolvedVersion}`"
1402- >sb internal</a
1403- >
1404- <!-- :to="{ name: 'code', params: { path: [pkg.name, 'v', resolvedVersion] } }" -->
1409+ <PackagePlaygrounds v-if =" playgroundLinks.length" :links =" playgroundLinks" />
14051410
14061411 <PackageCompatibility :engines =" displayVersion?.engines" />
14071412
0 commit comments