-
Notifications
You must be signed in to change notification settings - Fork 3
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
6 changed files
with
54 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
Empty file.
38 changes: 38 additions & 0 deletions
38
packages/vlossom/src/components/vs-value-tag/VsValueTag/VsValueTag.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,38 @@ | ||
<template> | ||
<div> </div> | ||
</template> | ||
<script lang="ts"> | ||
import { PropType, defineComponent, toRefs } from 'vue'; | ||
import { useColorScheme, useCustomStyle } from '@/composables'; | ||
import { ColorScheme, VsComponent } from '@/declaration/types'; | ||
interface ValueTagStyleSet {} | ||
export type VsValueTagStyleSet = Partial<ValueTagStyleSet>; | ||
const name = VsComponent.VsValueTag; | ||
const VsValueTag = defineComponent({ | ||
name, | ||
props: { | ||
colorScheme: { type: String as PropType<ColorScheme> }, | ||
styleSet: { type: [String, Object] as PropType<string | VsValueTagStyleSet>, default: '' }, | ||
}, | ||
setup(props) { | ||
const { colorScheme, styleSet } = toRefs(props); | ||
const { computedColorScheme } = useColorScheme(name, colorScheme); | ||
const { customProperties } = useCustomStyle<VsValueTagStyleSet>(name, styleSet); | ||
return { | ||
computedColorScheme, | ||
customProperties, | ||
}; | ||
}, | ||
}); | ||
export default VsValueTag; | ||
export type VsValueTagInstance = InstanceType<typeof VsValueTag>; | ||
</script> | ||
<style lang="scss" scoped src="./VsValueTag.scss" /> |
9 changes: 9 additions & 0 deletions
9
packages/vlossom/src/components/vs-value-tag/VsValueTag/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,9 @@ | ||
import type { App } from 'vue'; | ||
import VsValueTag from './VsValueTag.vue'; | ||
|
||
export default { | ||
install(app: App<Element>) { | ||
app.component('vs-value-tag', VsValueTag); | ||
}, | ||
}; | ||
export * from './VsValueTag.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,2 @@ | ||
export { default as VsValueTag } from './VsValueTag'; | ||
export type { VsValueTagInstance, VsValueTagStyleSet } from './VsValueTag'; |
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