ISSUE-068 - Now Styled-Components can self-label.
Updated babel-plugin-styled-components to a new version that works. Added extra option to macros settings to not bother showing the file names.
This commit is contained in:
1 parent
9ccaa5b3d6
commit
3b165c42e9
38 files changed
+66
-133
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import styled from "styled-components";
|
||||
import styled from "styled-components/macro";
|
||||
import { BGStatusIndicatorModes } from "../../../../types/state";
|
||||
|
||||
import { DirectionalTransitionProps } from "../../../../types/style";
|
||||
@@ -15,7 +15,6 @@ export const StatusIndicatorBase = styled.div<DirectionalTransitionProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
StatusIndicatorBase.displayName = "StatusIndicatorBase";
|
||||
|
||||
|
||||
export const StatusIndicatorLayout = styled.div`
|
||||
@@ -23,7 +22,6 @@ export const StatusIndicatorLayout = styled.div`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
`;
|
||||
StatusIndicatorLayout.displayName = "StatusIndicatorLayout";
|
||||
|
||||
type IndicatorModeProps = {
|
||||
mode: BGStatusIndicatorModes,
|
||||
@@ -64,7 +62,6 @@ export const LapLine = styled.div<LapLineProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
LapLine.displayName = "LapLine";
|
||||
|
||||
|
||||
type LapLabelProps = DirectionalTransitionProps & IndicatorModeProps;
|
||||
@@ -84,7 +81,6 @@ export const LapLabel = styled.span<LapLabelProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
LapLabel.displayName = "LapLabel";
|
||||
|
||||
|
||||
type LapCountProps = DirectionalTransitionProps & IndicatorModeProps;
|
||||
@@ -117,4 +113,3 @@ export const LapCount = styled.div<LapCountProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
LapCount.displayName = "LapCount";
|
||||
@@ -1,4 +1,4 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import styled, { css } from "styled-components/macro";
|
||||
import { animated } from "@react-spring/web";
|
||||
|
||||
import {
|
||||
@@ -33,7 +33,6 @@ export const RowsContainer = styled.div<RowsContainerProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
RowsContainer.displayName = "RowsContainer";
|
||||
|
||||
type AnimatedRowContainerProps = {
|
||||
retired?: boolean,
|
||||
@@ -59,7 +58,6 @@ export const AnimatedRowContainer = animated(styled.div.attrs<AnimatedRowContain
|
||||
|
||||
${({ retired }) => retired && css`opacity: 0.7;`}
|
||||
`);
|
||||
AnimatedRowContainer.displayName = "AnimatedRowContainer";
|
||||
|
||||
type RoundedProp = {
|
||||
roundedCornerTop?: Px,
|
||||
@@ -86,7 +84,6 @@ export const RowLeftHalf = styled(Rounded)<DirectionalTransitionProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
RowLeftHalf.displayName = "RowLeftHalf";
|
||||
|
||||
type AnimatedRowLeftHalfOutlineProps = DirectionalTransitionProps & {
|
||||
startThickness: Px,
|
||||
@@ -110,7 +107,6 @@ export const AnimatedRowLeftHalfOutline = animated(styled(Rounded)<AnimatedRowLe
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`);
|
||||
AnimatedRowLeftHalfOutline.displayName = "AnimatedRowLeftHalfOutline";
|
||||
|
||||
export const RowLeftHalfLayout = styled.div`
|
||||
position: relative;
|
||||
@@ -123,7 +119,6 @@ export const RowLeftHalfLayout = styled.div`
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
`;
|
||||
RowLeftHalfLayout.displayName = "RowLeftHalfLayout";
|
||||
|
||||
type RowLeftHalfPosFlagContainerProps = {
|
||||
size: Px,
|
||||
@@ -133,7 +128,6 @@ export const RowLeftHalfPosFlagContainer = styled.div<RowLeftHalfPosFlagContaine
|
||||
height: ${({ size }) => size}px;
|
||||
width: ${({ size }) => size}px;
|
||||
`;
|
||||
RowLeftHalfPosFlagContainer.displayName = "RowLeftHalfPosFlagContainer";
|
||||
|
||||
export const RowLeftHalfPosFlagChangeContainer = styled.div<OpenProps>`
|
||||
position: absolute;
|
||||
@@ -142,7 +136,6 @@ export const RowLeftHalfPosFlagChangeContainer = styled.div<OpenProps>`
|
||||
|
||||
opacity: ${({ open }) => open ? 1 : 0};
|
||||
`;
|
||||
RowLeftHalfPosFlagChangeContainer.displayName = "RowLeftHalfPosFlagChangeContainer";
|
||||
|
||||
export const RowLeftHalfGemContainer = styled.div`
|
||||
position: absolute;
|
||||
@@ -150,7 +143,6 @@ export const RowLeftHalfGemContainer = styled.div`
|
||||
top: 0;
|
||||
margin-top: 2px;
|
||||
`;
|
||||
RowLeftHalfGemContainer.displayName = "RowLeftHalfGemContainer";
|
||||
|
||||
type RowRightHalfProps = DirectionalTransitionProps & {
|
||||
hugRight: boolean,
|
||||
@@ -176,7 +168,6 @@ export const RowRightHalf = styled(Rounded)<RowRightHalfProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
RowRightHalf.displayName = "RowRightHalf";
|
||||
|
||||
export const RowRightHalfLayout = styled.div`
|
||||
width: 100%;
|
||||
@@ -188,14 +179,12 @@ export const RowRightHalfLayout = styled.div`
|
||||
justify-content: flex-end;
|
||||
padding-right: 8px;
|
||||
`;
|
||||
RowRightHalfLayout.displayName = "RowRightHalfLayout";
|
||||
|
||||
export const DriverNameContainer = styled.div`
|
||||
position: relative;
|
||||
margin-left: ${p => p.theme.design.timingTower.nameLeftMarginPx}px;
|
||||
margin-top: ${p => p.theme.design.timingTower.nameTopMarginPx}px;
|
||||
`;
|
||||
DriverNameContainer.displayName = "DriverNameContainer";
|
||||
|
||||
export const DriverName = styled.span<DirectionalTransitionProps>`
|
||||
position: absolute;
|
||||
@@ -211,7 +200,6 @@ export const DriverName = styled.span<DirectionalTransitionProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
DriverName.displayName = "DriverName";
|
||||
|
||||
export const DriverNameWipe = styled.div<DirectionalTransitionProps>`
|
||||
width: ${({ open }) => open ? 800 : 200}px;
|
||||
@@ -224,7 +212,6 @@ export const DriverNameWipe = styled.div<DirectionalTransitionProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
DriverNameWipe.displayName = "DriverNameWipe";
|
||||
|
||||
type TimeDiffProps = DirectionalTransitionProps & {
|
||||
xScale: Fraction,
|
||||
@@ -245,7 +232,6 @@ export const TimeDiff = styled.span<TimeDiffProps>`
|
||||
${({ open, transitionOpeningProps, transitionClosingProps, transitionProps }) =>
|
||||
commonDirectionalTransition(open, transitionOpeningProps, transitionClosingProps, transitionProps)}
|
||||
`;
|
||||
TimeDiff.displayName = "TimeDiff";
|
||||
|
||||
export const FastestLapContainer = styled.div`
|
||||
position: absolute;
|
||||
@@ -275,4 +261,3 @@ export const FastestLapGem = styled.div<TransitionProps>`
|
||||
|
||||
${({ transitionProps }) => commonTransition(transitionProps)}
|
||||
`;
|
||||
FastestLapGem.displayName = "FastestLapGem";
|
||||
@@ -1,4 +1,4 @@
|
||||
import styled from "styled-components";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
export const TimingBoardLayout = styled.div`
|
||||
position: relative;
|
||||
|
||||
Reference in new issue
Block a user