-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: apply new design to document thumbnail
- Loading branch information
Showing
10 changed files
with
206 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
61 changes: 61 additions & 0 deletions
61
src/stories/components/Document/DocumentThumbnail.stories.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { markRaw } from 'vue' | ||
import { PhFilePdf } from '@phosphor-icons/vue' | ||
|
||
import { withMurmur } from '~storybook/decorators/murmur' | ||
import DocumentThumbnail from '@/components/Document/DocumentThumbnail' | ||
|
||
export default { | ||
title: 'Components/Document/DocumentThumbnail', | ||
decorators: [withMurmur({ previewHost: null })], | ||
tags: ['autodocs'], | ||
argTypes: { | ||
size: { | ||
control: { type: 'select' }, | ||
options: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'] | ||
} | ||
}, | ||
args: { | ||
size: 'xs', | ||
crop: true, | ||
hover: false, | ||
clickable: true, | ||
fit: false, | ||
document: { | ||
extractionLevel: 0, | ||
inlineFullUrl: 'https://i.imgur.com/ns9ThQx.jpeg', | ||
contentLength: 0, | ||
contentType: 'image/jpeg', | ||
isSupportedImage: true, | ||
contentTypeIcon: markRaw(PhFilePdf) | ||
} | ||
}, | ||
render: (args) => ({ | ||
components: { | ||
DocumentThumbnail | ||
}, | ||
setup: () => ({ args }), | ||
template: ` | ||
<div style="background-color: var(--bs-light-bg-subtle);" class="p-3"> | ||
<document-thumbnail v-bind="args" /> | ||
</div> | ||
` | ||
}) | ||
} | ||
|
||
export const Default = {} | ||
|
||
export const WithPlaceholder = { | ||
args: { | ||
size: 'xs', | ||
crop: true, | ||
fit: false, | ||
document: { | ||
extractionLevel: 0, | ||
inlineFullUrl: null, | ||
contentLength: 0, | ||
contentType: 'image/jpeg', | ||
isSupportedImage: true, | ||
contentTypeIcon: markRaw(PhFilePdf) | ||
} | ||
} | ||
} |
This file contains 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