-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-settings-and-styles'
- Loading branch information
Showing
5 changed files
with
96 additions
and
57 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
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
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
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 |
---|---|---|
@@ -1,56 +1,45 @@ | ||
<template> | ||
<ul class="tabs flex items-center"> | ||
<li | ||
class="tab px-4 py-2 cursor-pointer flex-grow text-center bg-gray-50 hover:bg-gray-200" | ||
:class="{'active bg-gray-200': value ? (value === tab.value) : i === 0}" | ||
v-for="(tab, i) in tabs" :key="i" | ||
class="tab px-4 py-2 cursor-pointer flex-grow mr-1 text-center bg-gray-50 hover:bg-gray-200" | ||
:class="{ | ||
'active bg-gray-200': value ? value === tab.value : i === 0, | ||
}" | ||
v-for="(tab, i) in tabs" | ||
:key="i" | ||
@click="$emit('update:value', tab.value)" | ||
> | ||
<span class="text-lg" >{{ tab.label }}</span> | ||
</li> | ||
</ul> | ||
</template> | ||
|
||
<script lang='ts'> | ||
import { defineComponent, PropType } from "vue" | ||
; | ||
<script lang="ts"> | ||
import { defineComponent, PropType } from "vue"; | ||
export interface ITab { | ||
label: string | ||
value: string | ||
label: string; | ||
value: string; | ||
} | ||
export default defineComponent({ | ||
props: { | ||
tabs: Object as PropType<ITab[]>, | ||
value: String, | ||
}, | ||
components: { | ||
}, | ||
components: {}, | ||
data() { | ||
return { | ||
}; | ||
return {}; | ||
}, | ||
computed: { | ||
computed: {}, | ||
methods: {}, | ||
}, | ||
methods: { | ||
}, | ||
watch: { | ||
}, | ||
watch: {}, | ||
}); | ||
</script> | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.active{ | ||
border-bottom: 2px solid rgb(102, 102, 102); | ||
} | ||
.active { | ||
border-bottom: 2px solid rgb(102, 102, 102); | ||
} | ||
</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