ISSUE-062 - Expanding status indicator in place.
Moved some dimensions data to the themes object for re-use between components.
This commit is contained in:
1 parent
28e0e7f3d4
commit
d2e4afb975
7 files changed
+79
-69
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
import { broadcastGraphicsSelector } from "../../../../features/broadcast/graphics/broadcastGraphicsSelector";
|
||||
import { theme } from "../../../../shared/theme";
|
||||
import { BGStatusIndicatorModes } from "../../../../types/state";
|
||||
import { DebugDurationProps } from "../../../../types/style";
|
||||
|
||||
import { StatusIndicatorBase } from "./styles";
|
||||
@@ -10,12 +12,23 @@ type StatusIndicatorProps = DebugDurationProps;
|
||||
export function StatusIndicator({
|
||||
debugDurationMultiplier: DDM = 1.0,
|
||||
}: StatusIndicatorProps) {
|
||||
const { design: { timingTower: ttTheme } } = theme;
|
||||
|
||||
const { timingBoard: { statusIndicator: { mode } } } =
|
||||
useSelector(broadcastGraphicsSelector);
|
||||
|
||||
return (
|
||||
<StatusIndicatorBase
|
||||
mode={mode}
|
||||
open={mode !== BGStatusIndicatorModes.LapNarrow}
|
||||
transitionOpeningProps={[{
|
||||
property: "width",
|
||||
duration: ttTheme.fullWidthDurationMs * DDM,
|
||||
}]}
|
||||
transitionClosingProps={[{
|
||||
property: "width",
|
||||
duration: ttTheme.fullWidthDurationMs * DDM,
|
||||
delay: ttTheme.fullWidthCloseDelayMs * DDM,
|
||||
}]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user