Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impl Semester component And DocType component #48

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions packages/web/src/common/components/DocumentCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"use client";

import React from "react";
import styled from "styled-components";
import Typography from "./Typography";

const CardWrapper = styled.div`
display: flex;
width: 400px;
height: 138px;
flex-direction: column;
align-items: flex-start;
`;

const CardHeaderWrapper = styled.div`
display: flex;
padding: 13px 33px;
align-items: center;
gap: 10px;
align-self: stretch;
border-radius: 4px 4px 0px 0px;
background-color: ${({ theme }) => theme.colors.GREEN[700]};
`;

const CardContentWrapper = styled.div`
display: flex;
padding: 20px 32px;
justify-content: center;
align-items: center;
gap: 20px;
flex: 1 0 0;
align-self: stretch;
border-radius: 0px 0px 4px 4px;
border-right: 1px solid ${({ theme }) => theme.colors.GRAY[100]}; // CHACHA: D9 일단 GRAY 100으로?
border-bottom: 1px solid ${({ theme }) => theme.colors.GRAY[100]};
border-left: 1px solid ${({ theme }) => theme.colors.GRAY[100]};
background-color: ${({ theme }) => theme.colors.WHITE};
`;

const DocumentCard: React.FC = () => (
<CardWrapper>
<CardHeaderWrapper>
<Typography fs={20} fw="SEMIBOLD" color="WHITE">
문서 유형 선택
</Typography>
</CardHeaderWrapper>
<CardContentWrapper />
</CardWrapper>
);
export default DocumentCard;
51 changes: 51 additions & 0 deletions packages/web/src/common/components/SemesterCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"use client";

import React from "react";
import styled from "styled-components";
import Typography from "./Typography";

const CardWrapper = styled.div`
display: flex;
width: 400px;
height: 132px;
flex-direction: column;
align-items: flex-start;
`;

const CardHeaderWrapper = styled.div`
display: flex;
padding: 13px 33px;
align-items: center;
gap: 10px;
align-self: stretch;
border-radius: 4px 4px 0px 0px;
background-color: ${({ theme }) => theme.colors.GREEN[700]};
`;

const CardContentWrapper = styled.div`
display: flex;
padding: 20px 32px;
justify-content: center;
align-items: center;
gap: 20px;
flex: 1 0 0;
align-self: stretch;
border-radius: 0px 0px 4px 4px;
border-right: 1px solid ${({ theme }) => theme.colors.GRAY[100]}; // CHACHA: D9 일단 GRAY 100으로?
border-bottom: 1px solid ${({ theme }) => theme.colors.GRAY[100]};
border-left: 1px solid ${({ theme }) => theme.colors.GRAY[100]};
background-color: ${({ theme }) => theme.colors.WHITE};
`;

const SemesterCard: React.FC = () => (
<CardWrapper>
<CardHeaderWrapper>
<Typography fs={20} fw="SEMIBOLD" color="WHITE">
분기 선택
</Typography>
</CardHeaderWrapper>
<CardContentWrapper />
</CardWrapper>
);

export default SemesterCard;
2 changes: 1 addition & 1 deletion packages/web/src/common/components/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getColorFromTheme = (theme: Theme, colorString: ThemeColors) => {
const colorValue = theme.colors[colorKey as keyof Theme["colors"]];

if (typeof colorValue === "object" && shade in colorValue) {
return colorValue[shade as keyof typeof colorValue];
return colorValue[shade as unknown as keyof typeof colorValue];
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/web/src/styles/themes/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const colors = {
100: "#C3E3D6",
300: "#7FBDA4",
600: "#298062",
700: "#00674B",
800: "#09563F",
},
RED: {
Expand Down
Loading