ISSUE-045 - Chyron Body - Done!
There ain't no way in hell I'm going to be able to convincingly animate the AngledFlag without spending maybe an entire week on it. I would honestly want to re-do the entire AngledFlag component from scratch before trying to animate it. The combination of rules and styles and all that is just too confusing to attempt right now. So, a basic slide- and fade-in I think is decent enough work.
This commit is contained in:
1 parent
bab056394c
commit
284b0919d6
2 files changed
+10
-3
No files matched your search
@@ -50,7 +50,9 @@ export function ChyronDriver({
|
||||
|
||||
const flagProps = flagMode === "country"
|
||||
? { flagMode, flag: car.driver.nationality }
|
||||
: flagMode === "team" ? { flagMode, flag: car.driver.team.id } : undefined;
|
||||
: flagMode === "team"
|
||||
? { flagMode, flag: car.driver.team.id }
|
||||
: undefined;
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -192,7 +194,11 @@ export function ChyronDriver({
|
||||
open={openState !== 0}
|
||||
transitionProps={[{
|
||||
property: "opacity",
|
||||
duration: 500 * DDM,
|
||||
duration: 1200 * DDM,
|
||||
delay: 1000 * DDM,
|
||||
}, {
|
||||
property: "right",
|
||||
duration: 2000 * DDM,
|
||||
delay: 1000 * DDM,
|
||||
}]}
|
||||
height={baseHeight * 0.9}
|
||||
|
||||
@@ -188,7 +188,8 @@ type FlagContainerProps = {
|
||||
};
|
||||
export const FlagContainer = styled.div<FlagContainerProps & TransitionProps>`
|
||||
position: absolute;
|
||||
right: ${({ right }) => `${right}px`};
|
||||
right: ${({ right, open }) => open ? right : right * -3}px;
|
||||
z-index: -1;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in new issue
Block a user