Skip to content

Commit afbd407

Browse files
committed
create VTag component
1 parent 19f420d commit afbd407

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

frontend/src/components/VTag/VTag.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<VButton
3+
as="VLink"
4+
size="small"
5+
variant="filled-gray"
6+
class="label-bold"
7+
:href="href"
8+
>{{ title }}</VButton
9+
>
10+
</template>
11+
12+
<script lang="ts">
13+
import { defineComponent } from "@nuxtjs/composition-api"
14+
15+
import VButton from "~/components/VButton.vue"
16+
17+
export default defineComponent({
18+
name: "VTag",
19+
components: { VButton },
20+
props: {
21+
title: { type: String },
22+
href: {
23+
type: String,
24+
required: true,
25+
},
26+
},
27+
})
28+
</script>
29+
30+
<style scoped></style>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Canvas, Meta, Story } from "@storybook/addon-docs"
2+
3+
import VTag from "~/components/VTag/VTag.vue"
4+
5+
export const Template = (args) => ({
6+
template: `<VTag v-bind="args"/>`,
7+
components: { VTag },
8+
setup() {
9+
return { args }
10+
},
11+
})
12+
13+
<Meta title="Components/VTag" component={VTag} />
14+
15+
<Canvas>
16+
<Story name="default">{Template.bind({})}</Story>
17+
</Canvas>

0 commit comments

Comments
 (0)