mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Redesign karty stacji, małe zmiany w wyglądzie listy
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
|
||||
// You can declare mixins as the same style as components.
|
||||
@Component
|
||||
export default class styleMixin extends Vue {
|
||||
calculateStyle(exp: string | number): string {
|
||||
const bgColor = exp < 2 ? "#26B0D9" : `hsl(${-exp * 5 + 100}, 65%, 50%)`;
|
||||
const fontColor = exp > 15 ? "white" : "black";
|
||||
|
||||
return `backgroundColor: ${bgColor}; color: ${fontColor}`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user