Skip to content

Commit

Permalink
change on colors allowed for ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
P4l0m4 committed May 21, 2024
1 parent 4e72d76 commit 4e2dd50
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions @xen-orchestra/web-core/lib/components/UiLegend.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<li class="legend">
<span class="ellipsis" :class="legend.color"></span><span class="label">{{ legend.label }}</span
><UiIcon :icon="faCircleInfo" color="info" class="ui-icon" />
><UiIcon :icon="legend.info ? faCircleInfo : undefined" color="info" class="ui-icon" />

<span class="value">{{ legend.value }}</span>
<span class="unit">{{ legend.unit }}</span>
Expand All @@ -15,9 +15,10 @@ import { faCircleInfo } from '@fortawesome/free-solid-svg-icons'
defineProps<{
legend: {
value: number
color: Color | 'unknown'
color: Color | 'dark-blue' | 'disabled'
label: string
unit?: string
info?: boolean
}
}>()
</script>
Expand All @@ -33,7 +34,7 @@ defineProps<{
min-width: 0.8rem;
border-radius: 50%;
&.info {
&.default {
background-color: var(--color-purple-base);
}
&.success {
Expand All @@ -45,8 +46,11 @@ defineProps<{
&.error {
background-color: var(--color-red-base);
}
&.unknown {
background-color: var(--background-color-purple-10);
&.disabled {
background-color: var(--color-grey-300);
}
&.dark-blue {
background-color: var(--color-grey-100);
}
}
Expand All @@ -58,7 +62,6 @@ defineProps<{
& .ui-icon {
font-size: 1.2rem;
margin-right: auto;
}
& .value,
Expand All @@ -67,5 +70,9 @@ defineProps<{
font-size: 1.3rem;
color: var(--color-grey-300);
}
& .value {
margin-left: auto;
}
}
</style>

0 comments on commit 4e2dd50

Please sign in to comment.