refactor(tech-radar): add moved type

This commit is contained in:
Rémi DOREAU
2020-06-24 14:03:03 +02:00
parent 542d209a6b
commit 1baa5309a1
2 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -15,6 +15,7 @@
*/
import { createApiRef } from '@backstage/core';
import { MovedState } from './utils/types';
/**
* Types related to the Radar's visualization.
@@ -34,7 +35,7 @@ export interface RadarQuadrant {
export interface RadarEntry {
key: string; // react key
id: string;
moved: -1 | 0 | 1;
moved: MovedState;
quadrant: RadarQuadrant;
ring: RadarRing;
title: string;
+7 -1
View File
@@ -45,6 +45,12 @@ export type Segment = {
random: Function;
};
export enum MovedState {
Down = -1,
NoChange = 0,
Up = 1,
}
export type Entry = {
id: string;
index?: number;
@@ -61,7 +67,7 @@ export type Entry = {
// An URL to a longer description as to why this entry is where it is
url?: string;
// How this entry has recently moved; -1 for "down", +1 for "up", 0 for not moved
moved?: -1 | 0 | 1;
moved?: MovedState;
active?: boolean;
};