-
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
101 additions
and
1 deletion.
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
41 changes: 41 additions & 0 deletions
41
src/components/Document/DocumentSearchNav/DocumentSearchNav.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,41 @@ | ||
<script setup> | ||
import DocumentSearchNavItem from './DocumentSearchNavItem' | ||
defineProps({ | ||
disabledPrevious: { | ||
type: Boolean | ||
}, | ||
disabledNext: { | ||
type: Boolean | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="document-search-nav"> | ||
<slot> | ||
<document-search-nav-item | ||
icon="caret-left" | ||
:label="$t('documentSearchNavItem.previous')" | ||
:disabled="disabledPrevious" | ||
@click="$emit('previous')" | ||
/> | ||
<document-search-nav-item | ||
icon="caret-right" | ||
:label="$t('documentSearchNavItem.next')" | ||
:disabled="disabledNext" | ||
@click="$emit('next')" | ||
/> | ||
</slot> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.document-search-nav { | ||
display: inline-flex; | ||
padding: $spacer-xxs; | ||
border-radius: var(--bs-border-radius); | ||
color: var(--bs-light-color-subtle); | ||
background: var(--bs-light-bg-subtle); | ||
} | ||
</style> |
40 changes: 40 additions & 0 deletions
40
src/components/Document/DocumentSearchNav/DocumentSearchNavItem.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,40 @@ | ||
<script setup> | ||
defineProps({ | ||
icon: { | ||
type: String, | ||
required: true | ||
}, | ||
label: { | ||
type: String, | ||
required: true | ||
}, | ||
disabled: { | ||
type: Boolean | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<icon-button | ||
class="document-search-nav-item" | ||
variant="outline-tertiary" | ||
:icon-left="icon" | ||
icon-left-hover-weight="bold" | ||
:disabled="disabled" | ||
:label="label" | ||
square | ||
hide-label | ||
/> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.document-search-nav-item { | ||
--bs-btn-color: var(--bs-tertiary-text-emphasis); | ||
--bs-btn-border-color: transparent; | ||
--bs-btn-hover-bg: var(--bs-secondary); | ||
--bs-btn-hover-color: var(--bs-white); | ||
--bs-btn-hover-border-color: transparent; | ||
--bs-btn-active-bg: var(--bs-secondary); | ||
--bs-btn-active-color: var(--bs-white); | ||
} | ||
</style> |
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
13 changes: 13 additions & 0 deletions
13
src/stories/components/Document/DocumentSearchNav/DocumentSearchNav.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,13 @@ | ||
import DocumentSearchNav from '@/components/Document/DocumentSearchNav/DocumentSearchNav' | ||
|
||
export default { | ||
title: 'Components/Document/DocumentSearchNav/DocumentSearchNav', | ||
component: DocumentSearchNav, | ||
tags: ['autodocs'], | ||
args: { | ||
disablePrevious: false, | ||
disableNext: false | ||
} | ||
} | ||
|
||
export const Default = {} |