mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Added passthrough style for MainDisplay
This commit is contained in:
parent
bc69ffecfb
commit
b0f076b44f
4 changed files with 9 additions and 5 deletions
|
@ -885,7 +885,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
<MainDisplay
|
||||
resource={coal}
|
||||
color={colorCoal}
|
||||
style="margin-bottom: 0"
|
||||
style={{marginBottom: 0}}
|
||||
resourceStyle={{textShadow: 'grey 0px 0px 10px'}}
|
||||
effectDisplay={
|
||||
Decimal.gt(computedCoalGain.value, 0)
|
||||
? `+${format(computedCoalGain.value)}/s`
|
||||
|
|
|
@ -960,6 +960,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
<MainDisplay
|
||||
resource={oil}
|
||||
color={color}
|
||||
resourceStyle={{textShadow: 'grey 0px 0px 10px'}}
|
||||
sticky={true}
|
||||
productionDisplay={jsx(() => (
|
||||
<>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
>
|
||||
<div class="main-display">
|
||||
<span v-if="showPrefix">You have </span>
|
||||
<ResourceVue :resource="resource" :color="color || 'white'" />
|
||||
<ResourceVue :resource="resource" :color="color || 'white'" :style="resourceStyle" />
|
||||
{{ resource.displayName
|
||||
}}<!-- remove whitespace -->
|
||||
<span v-if="effectComponent"
|
||||
|
@ -27,7 +27,7 @@
|
|||
>
|
||||
<div class="main-display">
|
||||
<span v-if="showPrefix">You have </span>
|
||||
<ResourceVue :resource="resource" :color="color || 'white'" />
|
||||
<ResourceVue :resource="resource" :color="color || 'white'" :style="resourceStyle" />
|
||||
{{ resource.displayName
|
||||
}}<!-- remove whitespace -->
|
||||
<span v-if="effectComponent"
|
||||
|
@ -56,6 +56,7 @@ const _props = withDefaults(defineProps<{
|
|||
color?: string;
|
||||
classes?: Record<string, boolean>;
|
||||
style?: StyleValue;
|
||||
resourceStyle?: StyleValue;
|
||||
effectDisplay?: CoercableComponent;
|
||||
productionDisplay?: CoercableComponent;
|
||||
sticky?: boolean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<h2 :style="{ color, 'text-shadow': '0px 0px 10px ' + color }">
|
||||
<h2 :style="[{ color, 'text-shadow': '0px 0px 10px ' + color }, style ?? {}]">
|
||||
{{ amount }}
|
||||
</h2>
|
||||
</template>
|
||||
|
@ -7,11 +7,12 @@
|
|||
<script setup lang="ts">
|
||||
import type { Resource } from "features/resources/resource";
|
||||
import { displayResource } from "features/resources/resource";
|
||||
import { computed } from "vue";
|
||||
import { computed, StyleValue } from "vue";
|
||||
|
||||
const props = defineProps<{
|
||||
resource: Resource;
|
||||
color: string;
|
||||
style?: StyleValue;
|
||||
}>();
|
||||
|
||||
const amount = computed(() => displayResource(props.resource));
|
||||
|
|
Loading…
Reference in a new issue