-
Notifications
You must be signed in to change notification settings - Fork 265
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
1 parent
dacbe6a
commit d8a035e
Showing
5 changed files
with
131 additions
and
75 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
19 changes: 19 additions & 0 deletions
19
@xen-orchestra/lite/src/stories/web-core/tag/vts-tag-list.story.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,19 @@ | ||
<template> | ||
<ComponentStory | ||
v-slot="{ properties }" | ||
:params="[ | ||
prop('accent').enum('info', 'success', 'warning', 'danger').required().preset('info').widget(), | ||
prop('variant').enum('primary', 'secondary').required().preset('primary').widget(), | ||
]" | ||
> | ||
<VtsTagList v-bind="properties" :tags="tags" /> | ||
</ComponentStory> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import ComponentStory from '@/components/component-story/ComponentStory.vue' | ||
import { prop } from '@/libs/story/story-param' | ||
import VtsTagList from '@core/components/tag/VtsTagList.vue' | ||
const tags = ['tag1', 'tag2', 'tag3'] | ||
</script> |
48 changes: 48 additions & 0 deletions
48
@xen-orchestra/web-core/lib/components/card/VtsCardRowKeyValue.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> | ||
<div class="vts-card-row-key-value typo p3-regular"> | ||
<div class="key"> | ||
<slot name="key" /> | ||
</div> | ||
<div v-tooltip class="content text-ellipsis"> | ||
<slot name="value" /> | ||
</div> | ||
<div v-if="slots.addons" class="addons"> | ||
<slot name="addons" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { vTooltip } from '@core/directives/tooltip.directive' | ||
const slots = defineSlots<{ | ||
key(): any | ||
value(): any | ||
addons?(): any | ||
}>() | ||
</script> | ||
|
||
<style lang="postcss" scoped> | ||
.vts-card-row-key-value { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.8rem; | ||
.key { | ||
min-width: 12rem; | ||
overflow-wrap: break-word; | ||
color: var(--color-neutral-txt-secondary); | ||
} | ||
.content { | ||
color: var(--color-neutral-txt-primary); | ||
} | ||
.addons { | ||
display: flex; | ||
gap: 0.8rem; | ||
margin-left: auto; | ||
font-size: 1.6rem; | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div class="vts-tag-list"> | ||
<UiTag v-for="tag in tags" :key="tag" :accent :variant size="small">{{ tag }}</UiTag> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import UiTag from '@core/components/ui/tag/UiTag.vue' | ||
type TagAccent = 'info' | 'neutral' | 'success' | 'warning' | 'danger' | 'muted' | ||
type TagVariant = 'primary' | 'secondary' | ||
defineProps<{ | ||
tags: string[] | ||
accent: TagAccent | ||
variant: TagVariant | ||
}>() | ||
</script> | ||
|
||
<style scoped lang="postcss"> | ||
.vts-tag-list { | ||
display: flex; | ||
gap: 0.4rem; | ||
flex-wrap: wrap; | ||
} | ||
</style> |
55 changes: 0 additions & 55 deletions
55
@xen-orchestra/web-core/lib/components/ui/card-item/UiCardItem.vue
This file was deleted.
Oops, something went wrong.