ISSUE-045 - Venetian Blinds - Starting work on the "venetian blinds" transition effect.
I'll be starting with re-creating this effect on the PositionFlag component. That involves first separating out the PositionFlag into its own common component (it's used on the timing board as well, so it makes sense). Adding new overlays for prototyping work.
This commit is contained in:
1 parent
5e86b92ca5
commit
e747a7d7c3
13 files changed
+65
-34
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { Px } from "../../../../types/style";
|
||||
|
||||
import { PositionFlagBox, PositionNumber } from "./styles";
|
||||
|
||||
type PositionFlagProps = {
|
||||
size: Px,
|
||||
number: number,
|
||||
};
|
||||
export function PositionFlag({ size, number }: PositionFlagProps) {
|
||||
return (
|
||||
<PositionFlagBox size={size}>
|
||||
<PositionNumber size={size}>
|
||||
{number}
|
||||
</PositionNumber>
|
||||
</PositionFlagBox>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./PositionFlag";
|
||||
@@ -0,0 +1,29 @@
|
||||
import styled from "styled-components";
|
||||
import { Px } from "../../../../types/style";
|
||||
|
||||
type PositionFlagBoxProps = {
|
||||
size: Px,
|
||||
};
|
||||
export const PositionFlagBox = styled.div<PositionFlagBoxProps>`
|
||||
position: relative;
|
||||
height: ${({ size }) => `${size}px`};
|
||||
width: ${({ size }) => `${size}px`};
|
||||
|
||||
border-bottom-right-radius: 15%;
|
||||
background-color: #f4f3ee;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
`;
|
||||
PositionFlagBox.displayName = "PositionFlagBox";
|
||||
|
||||
type PositionNumberProps = {
|
||||
size: Px,
|
||||
};
|
||||
export const PositionNumber = styled.span<PositionNumberProps>`
|
||||
font-family: ${p => p.theme.fonts.f1Regular};
|
||||
font-size: ${({ size }) => `${size * 0.64}px`};
|
||||
margin-top: 2px;
|
||||
`;
|
||||
PositionNumber.displayName = "PositionNumber";
|
||||
Reference in new issue
Block a user