ISSUE-031 - Big update. AngledFlag component is born!

It's not 100% complete - I still need to add the second, slightly offset sub flag that goes beneath the main flag, creating a sort of refractive-glass/parallax effect.

Needed to add a new workspace. Thankfully it's pretty easy to add a new workspace. So, kinda nice.

Did a lot of work making 2:1 versions of each flag in vector. Was a bit of a pain in the ass.

Renamed a prop for ProgressSlider, "onBarColor" because prefixing a prop with "on" is special for React and it gets upset and spits out an error.
This commit is contained in:
Kyle Geib committed 2022-01-24 16:15:43 -05:00
1 parent 55e07a444e
commit 4a9c124832
46 files changed
+1063 -70

No files matched your search

@@ -1,8 +1,9 @@
import styled from "styled-components";
import { Px } from "../../../../types/style";
type BaseBackgroundProps = {
width: number, // px
height: number, // px
width: Px,
height: Px,
};
export const BaseBackground = styled.div<BaseBackgroundProps>`
position: relative;
@@ -20,7 +21,7 @@ export const BaseBackground = styled.div<BaseBackgroundProps>`
BaseBackground.displayName = "BaseBackground";
type PositionFlagProps = {
containerHeight: number, // px
containerHeight: Px,
};
export const PositionFlag = styled.div<PositionFlagProps>`
position: relative;
@@ -37,7 +38,7 @@ export const PositionFlag = styled.div<PositionFlagProps>`
PositionFlag.displayName = "PositionFlag";
type PositionNumberProps = {
containerHeight: number, // px
containerHeight: Px,
};
export const PositionNumber = styled.span<PositionNumberProps>`
font-family: ${p => p.theme.fonts.f1Regular};
@@ -116,3 +117,22 @@ export const Spacer = styled.div<SpacerProps>`
height: ${({ height = "0" }) => height};
`;
Spacer.displayName = "Spacer";
type FlagContainerProps = {
height: Px,
width: Px,
};
export const FlagContainer = styled.div<FlagContainerProps>`
position: absolute;
right: -65px;
display: flex;
align-items: center;
justify-content: flex-end;
height: ${({ height }) => `${height}px`};
width: ${({ width }) => `${width}px`};
overflow: hidden;
`;
FlagContainer.displayName = "FlagContainer";