-
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.
- Loading branch information
Showing
5 changed files
with
112 additions
and
0 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
51 changes: 51 additions & 0 deletions
51
src/components/Document/DocumentUserActions/DocumentUserActions.vue
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,51 @@ | ||
<template> | ||
<b-button-group class="document-user-actions"> | ||
<document-user-actions-entry v-if="showTags" :hide-label="hideLabels" icon="tag" label="Tags" value="3+" /> | ||
<document-user-actions-entry | ||
v-if="showComments" | ||
:hide-label="hideLabels" | ||
icon="chats-teardrop" | ||
label="Comments" | ||
value="3+" | ||
/> | ||
<document-user-actions-entry | ||
v-if="showRecommended" | ||
:hide-label="hideLabels" | ||
icon="user-gear" | ||
label="Recommended by" | ||
value="3+" | ||
/> | ||
<document-user-actions-entry v-if="showFolders" :hide-label="hideLabels" icon="folder" label="Folder" value="3+" /> | ||
<document-user-actions-entry v-if="showNotes" :hide-label="hideLabels" icon="note-blank" label="Notes" value="3+" /> | ||
</b-button-group> | ||
</template> | ||
<script setup> | ||
import DocumentUserActionsEntry from '@/components/Document/DocumentUserActions/DocumentUserActionsEntry' | ||
defineOptions({ name: 'DocumentUserActions' }) | ||
defineProps({ | ||
showTags: { | ||
type: Boolean, | ||
default: true | ||
}, | ||
showComments: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
showRecommended: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
showFolders: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
showNotes: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
hideLabels: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}) | ||
</script> |
21 changes: 21 additions & 0 deletions
21
src/components/Document/DocumentUserActions/DocumentUserActionsEntry.vue
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,21 @@ | ||
<template> | ||
<icon-button | ||
class="document-user-actions-entry bg-action-subtle text-action border-0" | ||
variant="outline-action" | ||
:icon-left="icon" | ||
:label="value" | ||
:aria-describedby="label" | ||
/> | ||
</template> | ||
<script setup> | ||
import IconButton from '@/components/IconButton' | ||
defineOptions({ name: 'DocumentUserActionsEntry' }) | ||
defineProps({ | ||
label: { type: String, required: true }, | ||
value: { type: String, required: true }, | ||
icon: { type: String, required: true }, | ||
first: { type: Boolean } | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
26 changes: 26 additions & 0 deletions
26
src/stories/components/Document/DocumentUserActions/DocumentUserActions.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,26 @@ | ||
import DocumentUserActions from '@/components/Document/DocumentUserActions/DocumentUserActions' | ||
|
||
export default { | ||
title: 'Components/Document/DocumentUserActions/DocumentUserActions', | ||
tags: ['autodocs'], | ||
component: DocumentUserActions, | ||
args: { | ||
showTags: true, | ||
showComments: false, | ||
showRecommended: false, | ||
showFolders: false, | ||
showNotes: false, | ||
hideLabels: false | ||
} | ||
} | ||
|
||
export const Default = {} | ||
export const Complete = { | ||
args: { | ||
showTags: true, | ||
showComments: true, | ||
showRecommended: true, | ||
showFolders: true, | ||
showNotes: true | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/stories/components/Document/DocumentUserActions/DocumentUserActionsEntry.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,12 @@ | ||
import DocumentUserActionsEntry from '@/components/Document/DocumentUserActions/DocumentUserActionsEntry' | ||
|
||
export default { | ||
title: 'Components/Document/DocumentUserActions/DocumentUserActionsEntry', | ||
tags: ['autodocs'], | ||
component: DocumentUserActionsEntry, | ||
args: {} | ||
} | ||
|
||
export const Default = { | ||
args: { icon: 'tag', label: 'Tag', value: '3' } | ||
} |