ISSUE-043 - Created a decent and simple solution for spacing pairs of medium chyrons just using a flexbox div.
Also took the time to crop some overlay images.
This commit is contained in:
1 parent
51e6fac66c
commit
8d8eaf29cf
5 files changed
+16
-14
No files matched your search
@@ -1,32 +1,32 @@
|
|||||||
import { Inline } from "@bedrock-layout/inline";
|
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
import { broadcastGraphicsSelector } from "../../../../features/broadcast/graphics/broadcastGraphicsSelector";
|
import { broadcastGraphicsSelector } from "../../../../features/broadcast/graphics/broadcastGraphicsSelector";
|
||||||
|
|
||||||
import { ChyronDriver } from "../Driver";
|
import { ChyronDriver } from "../Driver";
|
||||||
import { Spacer } from "./styles";
|
import { DoubleChyronContainer } from "./styles";
|
||||||
|
|
||||||
export function ChyronContainer() {
|
export function ChyronContainer() {
|
||||||
const { chyrons } = useSelector(broadcastGraphicsSelector);
|
const { chyrons } = useSelector(broadcastGraphicsSelector);
|
||||||
|
|
||||||
if (chyrons == null || chyrons.driver == null) return null;
|
if (chyrons == null || chyrons.driver == null) return null;
|
||||||
|
|
||||||
return (
|
const primary = (
|
||||||
<Inline gutter="none">
|
|
||||||
|
|
||||||
<ChyronDriver
|
<ChyronDriver
|
||||||
chyronData={chyrons.driver.primary}
|
chyronData={chyrons.driver.primary}
|
||||||
subMode={chyrons.subMode}
|
subMode={chyrons.subMode}
|
||||||
/>
|
/>
|
||||||
{chyrons.subMode == "medium" && chyrons.driver.secondary && (
|
);
|
||||||
<>
|
if (chyrons.subMode === "medium" && chyrons.driver.secondary) {
|
||||||
<Spacer />
|
return (
|
||||||
|
<DoubleChyronContainer>
|
||||||
|
{primary}
|
||||||
<ChyronDriver
|
<ChyronDriver
|
||||||
chyronData={chyrons.driver.secondary}
|
chyronData={chyrons.driver.secondary}
|
||||||
subMode={chyrons.subMode}
|
subMode={chyrons.subMode}
|
||||||
/>
|
/>
|
||||||
</>
|
</DoubleChyronContainer>
|
||||||
)}
|
|
||||||
</Inline>
|
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return primary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
export const Spacer = styled.div`
|
export const DoubleChyronContainer = styled.div`
|
||||||
width: 32px;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 1196px;
|
||||||
`;
|
`;
|
||||||
Spacer.displayName = "Spacer";
|
DoubleChyronContainer.displayName = "DoubleChyronContainer";
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
Reference in new issue
Block a user