ISSUE-057 - Added color and wipe effect to position flag on timing tower.
Also adjusted timing for transitions to match what is shown on broadcast TV.
This commit is contained in:
1 parent
759e788af4
commit
e88bd614d3
9 files changed
+123
-13
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { theme } from "../../../../shared/theme";
|
||||
import { Fraction, Px } from "../../../../types/style";
|
||||
|
||||
import { PositionFlagBox, PositionNumber } from "./styles";
|
||||
@@ -6,10 +7,16 @@ type PositionFlagProps = {
|
||||
size: Px,
|
||||
number: number,
|
||||
numberSizeFraction?: Fraction,
|
||||
color?: string;
|
||||
};
|
||||
export function PositionFlag({ size, number, numberSizeFraction = 0.64 }: PositionFlagProps) {
|
||||
export function PositionFlag({
|
||||
size,
|
||||
number,
|
||||
numberSizeFraction = 0.64,
|
||||
color = theme.colors.positionFlagBG,
|
||||
}: PositionFlagProps) {
|
||||
return (
|
||||
<PositionFlagBox size={size}>
|
||||
<PositionFlagBox size={size} color={color}>
|
||||
<PositionNumber size={size * numberSizeFraction}>
|
||||
{number}
|
||||
</PositionNumber>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Px } from "../../../../types/style";
|
||||
|
||||
type PositionFlagBoxProps = {
|
||||
size: Px,
|
||||
color: string,
|
||||
};
|
||||
export const PositionFlagBox = styled.div<PositionFlagBoxProps>`
|
||||
position: relative;
|
||||
@@ -10,7 +11,7 @@ export const PositionFlagBox = styled.div<PositionFlagBoxProps>`
|
||||
width: ${({ size }) => `${size}px`};
|
||||
|
||||
border-bottom-right-radius: 15%;
|
||||
background-color: #f4f3ee;
|
||||
background-color: ${({ color }) => color};
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in new issue
Block a user