From 7aff7a24c6bc3d981285aae35d7357989a1f6522 Mon Sep 17 00:00:00 2001 From: Kyle Geib Date: Tue, 21 Dec 2021 14:38:07 -0500 Subject: [PATCH] ISSUE-003 - I'm struggling to get Babel Macros to work correctly in my project. So here I'm just manually writing the display names for my styled components. --- src/components/Broadcast/Layout/styles.ts | 2 ++ src/components/Common/MockupBlock.styled.ts | 1 + src/components/Common/Nav.styled.ts | 1 + src/components/Common/RouteHeader/styles.ts | 1 + src/routes/styles.ts | 3 ++- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Broadcast/Layout/styles.ts b/src/components/Broadcast/Layout/styles.ts index 65fafb0..8026b74 100644 --- a/src/components/Broadcast/Layout/styles.ts +++ b/src/components/Broadcast/Layout/styles.ts @@ -14,6 +14,7 @@ export const LayoutGrid = styled.div` height: calc(100% - ${({ headerOffset = 0 }) => headerOffset}px); width: 100%; `; +LayoutGrid.displayName = "LayoutGrid"; type LayoutGridItemProps = { column: number, @@ -27,3 +28,4 @@ export const LayoutGridItem = styled.div` grid-row: ${({ row }) => row} / span ${({ rowSpan = 1 }) => rowSpan};; `; +LayoutGridItem.displayName = "LayoutGridItem"; diff --git a/src/components/Common/MockupBlock.styled.ts b/src/components/Common/MockupBlock.styled.ts index cd80f65..135599b 100644 --- a/src/components/Common/MockupBlock.styled.ts +++ b/src/components/Common/MockupBlock.styled.ts @@ -16,3 +16,4 @@ export const MockupBlock = styled.div` background-color: ${({ color }) => color}; padding: 0.3em; `; +MockupBlock.displayName = "MockupBlock"; diff --git a/src/components/Common/Nav.styled.ts b/src/components/Common/Nav.styled.ts index 4c9024b..c828f17 100644 --- a/src/components/Common/Nav.styled.ts +++ b/src/components/Common/Nav.styled.ts @@ -5,3 +5,4 @@ export const Nav = styled.nav` padding-bottom: 1rem; padding-left: 1rem; `; +Nav.displayName = "Nav"; diff --git a/src/components/Common/RouteHeader/styles.ts b/src/components/Common/RouteHeader/styles.ts index 5fca116..64a9439 100644 --- a/src/components/Common/RouteHeader/styles.ts +++ b/src/components/Common/RouteHeader/styles.ts @@ -11,3 +11,4 @@ export const HeaderBar = styled.header` font-family: ${p => p.theme.fonts.accent}; font-size: 0.8em; `; +HeaderBar.displayName = "HeaderBar"; diff --git a/src/routes/styles.ts b/src/routes/styles.ts index c7c1b34..59729c3 100644 --- a/src/routes/styles.ts +++ b/src/routes/styles.ts @@ -5,7 +5,7 @@ type FullScreenContainerProps = { minWidth?: number, } -export const FullScreenContainer = styled.div < FullScreenContainerProps>` +export const FullScreenContainer = styled.div` --minHeight: ${({ minHeight = 0 }) => `${minHeight}px`}; --minWidth: ${({ minWidth = 0 }) => `${minWidth}px`}; --overflowY: ${({ minHeight }) => minHeight ? "scroll" : "hidden" }; @@ -20,3 +20,4 @@ export const FullScreenContainer = styled.div < FullScreenContainerProps>` overflow-y: var(--overflowY); overflow-x: var(--overflowX); `; +FullScreenContainer.displayName = "FullScreenContainer";