Skip to content

Commit

Permalink
doc: simplify doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Jul 17, 2024
1 parent 0916b87 commit efc9e03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
18 changes: 5 additions & 13 deletions src/stories/components/Document/DocumentCard.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const routes = [
export default {
title: 'Components/Document/DocumentCard',
decorators: [withMurmur({ previewHost: null }), vueRouter(routes)],
component: DocumentCard,
tags: ['autodocs'],
argTypes: {
properties: {
Expand All @@ -41,9 +42,9 @@ export default {
}
},
args: {
active: true,
selected: true,
selectMode: true,
active: false,
selected: false,
selectMode: false,
to: { name: 'document' },
properties: [
'title',
Expand Down Expand Up @@ -81,16 +82,7 @@ export default {
],
contentTypeIcon: markRaw(PhFilePdf)
}
},
render: (args) => ({
components: {
DocumentCard
},
setup: () => ({ args }),
template: `
<document-card v-bind="args" @update:selected="args.selected = $event" />
`
})
}
}

export const Default = {}
12 changes: 2 additions & 10 deletions src/stories/components/Document/DocumentThumbnail.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import DocumentThumbnail from '@/components/Document/DocumentThumbnail'
export default {
title: 'Components/Document/DocumentThumbnail',
decorators: [withMurmur({ previewHost: null })],
component: DocumentThumbnail,
tags: ['autodocs'],
argTypes: {
size: {
Expand All @@ -29,16 +30,7 @@ export default {
isSupportedImage: true,
contentTypeIcon: markRaw(PhFilePdf)
}
},
render: (args) => ({
components: {
DocumentThumbnail
},
setup: () => ({ args }),
template: `
<document-thumbnail v-bind="args" />
`
})
}
}

export const Default = {}
Expand Down

0 comments on commit efc9e03

Please sign in to comment.