Made MainDisplay sticky
This commit is contained in:
parent
64d6aae1c0
commit
62d23ec699
1 changed files with 18 additions and 8 deletions
|
@ -1,15 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<Sticky>
|
||||
<div class="main-display">
|
||||
<span v-if="showPrefix">You have </span>
|
||||
<ResourceVue :resource="resource" :color="color || 'white'" />
|
||||
{{ resource.displayName
|
||||
}}<!-- remove whitespace -->
|
||||
<span v-if="effectComponent">, <component :is="effectComponent" /></span>
|
||||
<br /><br />
|
||||
</div>
|
||||
</Sticky>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Sticky from "components/layout/Sticky.vue";
|
||||
import type { CoercableComponent } from "features/feature";
|
||||
import type { Resource } from "features/resources/resource";
|
||||
import ResourceVue from "features/resources/Resource.vue";
|
||||
|
@ -35,3 +37,11 @@ const showPrefix = computed(() => {
|
|||
return Decimal.lt(props.resource.value, "1e1000");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.main-display {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue