Skip to content

Commit

Permalink
Merge pull request #15 from likelionknu11/Feature/9/button
Browse files Browse the repository at this point in the history
Feature: button(#9)
  • Loading branch information
Cjieun authored May 4, 2023
2 parents b1fb8bc + d781257 commit fa21813
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/components/common/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/** @jsxImportSource @emotion/react */
import { css } from "@emotion/react";

export default function Button({ btnColor, children, onClick }) {
const color = { blue: "#ffffff", gray: "#2B2B2B" };
const backColor = { blue: "#4F85EB", gray: "#D9D9D9" };
const btn = css`
width: 5em;
height: 2.5em;
color: ${color[btnColor]};
background-color: ${backColor[btnColor]};
font-style: normal;
font-weight: 700;
font-size: 1.25em;
text-align: center;
border-radius: 10px;
`;
return (
<div>
<button css={btn} onClick={onClick}>
{children}
</button>
</div>
);
}
1 change: 1 addition & 0 deletions src/styles/Global.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
padding: 0;
text-decoration: none;
background-color: #181818;
font-family: 'Roboto', 'Noto Sans';
}

0 comments on commit fa21813

Please sign in to comment.