ISSUE-031 - Refactor improvements to ChyronDriver component. Relying less on absolute positioning and hard-coded values.
I realized that there are some variations of the driver chyron. Such as the one without a position flag.
This commit is contained in:
1 parent
db14bf902f
commit
a7ca0aecb0
3 files changed
+60
-31
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import { DriverNumber } from "../../Common/DriverNumber";
|
||||
import {
|
||||
BaseBackground,
|
||||
FirstName,
|
||||
PositionNumber,
|
||||
LastName,
|
||||
NameContainer,
|
||||
NumberContainer,
|
||||
PositionFlag,
|
||||
Spacer,
|
||||
TeamColorBar,
|
||||
TeamName,
|
||||
TextContainer,
|
||||
} from "./styles";
|
||||
|
||||
export function ChyronDriverBasic() {
|
||||
// TODO - Get driver details from Redux.
|
||||
|
||||
const baseWidth = 582;
|
||||
const baseHeight = 72;
|
||||
|
||||
return (
|
||||
<BaseBackground width={baseWidth} height={baseHeight}>
|
||||
<Spacer width="6px" />
|
||||
<PositionFlag containerHeight={baseHeight}>
|
||||
<PositionNumber containerHeight={baseHeight}>1</PositionNumber>
|
||||
</PositionFlag>
|
||||
<Spacer width="8px" />
|
||||
<TeamColorBar color="#00d2be" />
|
||||
<Spacer width="8px" />
|
||||
<TextContainer>
|
||||
<NameContainer>
|
||||
<FirstName>Lewis</FirstName>
|
||||
<LastName>Hamilton</LastName>
|
||||
<NumberContainer>
|
||||
<DriverNumber teamId="mercedes" fontSize="29px" number={44} />
|
||||
</NumberContainer>
|
||||
</NameContainer>
|
||||
<TeamName>Mercedes</TeamName>
|
||||
</TextContainer>
|
||||
</BaseBackground>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user