-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#223: Add new component for account external link
- Loading branch information
1 parent
455bb45
commit ef76fd3
Showing
4 changed files
with
67 additions
and
6 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
48 changes: 48 additions & 0 deletions
48
packages/vue/src/components/SpAccDropdownExternalLink/SpAccDropdownExternalLink.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,48 @@ | ||
<template> | ||
<a class="dropdown-option mb-3" :href='link' :target='target'> | ||
<span v-text='title'></span> | ||
<SpExternalArrowIcon v-if='hasIcon' /> | ||
</a> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { | ||
defineComponent, | ||
} from 'vue' | ||
import SpExternalArrowIcon from '../SpExternalArrow' | ||
export default defineComponent({ | ||
name: 'SpAccDropdownExternalLink', | ||
components: { | ||
SpExternalArrowIcon, | ||
}, | ||
props: { | ||
title: { | ||
type: String, | ||
required: true | ||
}, | ||
link: { | ||
type: String, | ||
required: true | ||
}, | ||
target: { | ||
type: String, | ||
default: '_blank' | ||
}, | ||
hasIcon: { | ||
type: Boolean, | ||
default: true | ||
}, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style lang='scss' scoped> | ||
.dropdown-option { | ||
color: #111111; | ||
text-decoration: none; | ||
} | ||
</style> |
13 changes: 13 additions & 0 deletions
13
packages/vue/src/components/SpAccDropdownExternalLink/index.ts
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 { App as Application } from 'vue' | ||
|
||
import { registerComponent } from './../../utils/plugins/index' | ||
// @ts-ignore | ||
import C from './SpAccDropdownExternalLink.vue' | ||
|
||
export const Plugin = { | ||
install(vue: Application): void { | ||
registerComponent(vue, C) | ||
} | ||
} | ||
|
||
export default C |
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