Skip to content

Commit

Permalink
fix: metric-card styling in dashboards (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipgutica authored Feb 22, 2024
1 parent f175629 commit 7820dbe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const gridTiles = computed(() => {
.tile-container {
border: 1px solid $kui-color-border;
border-radius: $kui-border-radius-20;
height: 100%;
}
}
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<MetricsProviderInternal v-bind="options">
<MetricsConsumer />
</MetricsProviderInternal>
<div class="metric-card-tile-wrapper">
<MetricsProviderInternal v-bind="options">
<MetricsConsumer class="metric-consumer" />
</MetricsProviderInternal>
</div>
</template>
<script setup lang="ts">
import type { MetricCardOptions, RendererProps } from '../types'
Expand All @@ -21,3 +23,33 @@ const options = computed<ProviderProps>(() => ({
refreshInterval: 0,
}))
</script>

<style scoped lang="scss">
.metric-card-tile-wrapper {
padding: $kui-space-80;
@media (min-width: ($kui-breakpoint-phablet - 1px)) {
align-items: center;
display: flex;
height: 100%;
padding: 0 $kui-space-80;
}
:deep(.kong-ui-public-metric-card-container) {
height: 100%;
@media (min-width: ($kui-breakpoint-phablet - 1px)) {
height: 80%;
}
.metricscard {
justify-content: space-evenly;
@media (min-width: ($kui-breakpoint-phablet - 1px)) {
&:not(:last-of-type) {
border-right: $kui-border-width-10 solid $kui-color-border;
}
}
}
}
}
</style>

0 comments on commit 7820dbe

Please sign in to comment.