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

[조은서] 리액트 과제 끝! #7

Open
wants to merge 21 commits into
base: 조은서
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
text box 수정
eundeok9 committed May 6, 2022
commit 45e2e3a307a698ccdb8ff4fd56e8a179d0acb0a6
15 changes: 12 additions & 3 deletions src/component/Text/index.js
Original file line number Diff line number Diff line change
@@ -2,12 +2,21 @@ import React from "react";
import styled from "styled-components";

const StyledText = styled.div`
font-size: 10px;
color: ${(props) => (props.color ? props.color : "black")};
font-size: ${(props) => props.fSize};
color: ${(props) => (props.fcolor ? props.fcolor : "black")};
font-weight: ${(props) => props.fWeight};
`;

const TextBox = (props) => {
return <StyledText color={props.color}>{props.children}</StyledText>;
return (
<StyledText
fcolor={props.color}
fSize={props.fontSize}
fweight={props.fontWeight}
>
{props.children}
</StyledText>
);
};

export default TextBox;