From 6283fa3941427295e3d2fbf10505bcf964bbec89 Mon Sep 17 00:00:00 2001 From: Caroline Desprat Date: Mon, 22 Jul 2024 15:26:37 +0000 Subject: [PATCH] feat: add document action button --- src/components/DocumentActionButton.vue | 83 +++++++++++++++++++ .../components/DocumentActions.stories.js | 51 ++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 src/components/DocumentActionButton.vue create mode 100644 src/stories/components/DocumentActions.stories.js diff --git a/src/components/DocumentActionButton.vue b/src/components/DocumentActionButton.vue new file mode 100644 index 0000000000..34a7688480 --- /dev/null +++ b/src/components/DocumentActionButton.vue @@ -0,0 +1,83 @@ + + + diff --git a/src/stories/components/DocumentActions.stories.js b/src/stories/components/DocumentActions.stories.js new file mode 100644 index 0000000000..9b169dd8bf --- /dev/null +++ b/src/stories/components/DocumentActions.stories.js @@ -0,0 +1,51 @@ +import IconButton from '@/components/IconButton' +import DocumentActionsGroup from '@/components/DocumentActionsGroup.vue' + +export default { + components: { DocumentActionsGroup }, + title: 'Components/DocumentActions', + component: IconButton, + tags: ['autodocs'], + render: (args) => ({ + components: { + DocumentActionsGroup + }, + setup() { + return { + args + } + }, + template: ` + + ` + }) +} + +export const Default = { + args: { + document: { + routerParams: {}, + contentType: '', + contentTypeLabel: '', + fullUrl: '', + fullRootUrl: '', + title: '', + content: '', + root: { contentType: '' } + }, + vertical: false, + tooltipsPlacement: 'top', + displayDownloadOptions: false, + isDownloadAllowed: false, + starBtnClass: 'btn-link btn-sm', + starredBtnClass: 'starred', + downloadBtnClass: 'btn-link btn-sm', + downloadBtnGroupClass: '', + popupBtnClass: 'btn-link btn-sm', + starBtnLabel: false, + downloadBtnLabel: false, + popupBtnLabel: false, + noBtnGroup: false, + isStarred: false + } +}