ISSUE-035 - Took some work but have proper type checking for AngledFlag props and have updated everything necessary.
Styling is still to come. Only have Ferrari working. I've discovered that the team flags are wider than the country flags. So I'll be tackling that necessary change in the next commit before dealing with styling.
This commit is contained in:
1 parent
57647f6488
commit
bd1892ab17
9 files changed
+231
-53
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { theme } from "../../shared/theme";
|
||||
import { Driver, Team } from "../../types/state";
|
||||
import { Percent } from "../../types/style";
|
||||
import { repeater } from "../../utils/strings";
|
||||
|
||||
/**
|
||||
@@ -418,3 +419,66 @@ export const teamNumberStyles: { [teamId: string]: NumberStyle } = {
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
export type TeamFlagStyle = {
|
||||
backgroundColor?: string,
|
||||
backgroundImage?: string,
|
||||
imageSize: Percent,
|
||||
imagePos: {
|
||||
x: Percent,
|
||||
y: Percent,
|
||||
},
|
||||
};
|
||||
export const teamFlagStyles: { [teamId: string]: TeamFlagStyle } = {
|
||||
alpine: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
alfaRomeo: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
alphaTauri: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
astonMartin: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
haas: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
ferrari: {
|
||||
backgroundColor: "#dc0000",
|
||||
imageSize: 55,
|
||||
imagePos: { x: 80, y: -40 },
|
||||
},
|
||||
mclaren: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
mercedes: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
redBull: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
williams: {
|
||||
backgroundColor: "black",
|
||||
imageSize: 50,
|
||||
imagePos: { x: 50, y: 50 },
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user