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
@@ -29,6 +29,9 @@ export function ChyronDriver({ chyronData, subMode }: ChyronDriverProps) {
|
||||
: [0, 0];
|
||||
|
||||
const { car, flagMode, showPosFlag, showDriverNumber } = chyronData;
|
||||
const flagProps = flagMode === "country"
|
||||
? { flagMode, flag: car.driver.nationality }
|
||||
: flagMode === "team" ? { flagMode, flag: car.driver.team.id } : undefined;
|
||||
|
||||
return (
|
||||
<BaseBackground width={baseWidth} height={baseHeight}>
|
||||
@@ -64,11 +67,12 @@ export function ChyronDriver({ chyronData, subMode }: ChyronDriverProps) {
|
||||
width={baseHeight * 3}
|
||||
right={-baseHeight * 0.6}
|
||||
>
|
||||
<AngledFlag
|
||||
flagMode={flagMode}
|
||||
flag={car.driver.nationality}
|
||||
flagHeight={baseHeight * 0.9}
|
||||
/>
|
||||
{flagProps != null && (
|
||||
<AngledFlag
|
||||
flagHeight={baseHeight * 0.9}
|
||||
flagProps={flagProps}
|
||||
/>
|
||||
)}
|
||||
</FlagContainer>
|
||||
</BaseBackground>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user