Skip to content

Commit

Permalink
refactor/depromeet#11 Refactor SocialLoginButton
Browse files Browse the repository at this point in the history
  • Loading branch information
sean2337 committed Jul 7, 2024
1 parent 2f3eecc commit 987a3b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/component/button/SocialLoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { css } from "@emotion/react";
import { loginTypeProvider, loginBtnType } from "@/types/loginType";
import { loginTypeProvider, loginBtnProps, backgroundColors } from "@/types/loginType";
import LoginSpriteSvg from "../Img/LoginSpriteSvg";

// FIXME : 버튼 색 수정 필요
const backgroundColors: Record<keyof typeof loginTypeProvider, string> = {
kakao: "#ffe400",
google: "#FFFFFF",
apple: "red",
};

const SocialLoginButton = ({ type, handler }: loginBtnType) => {
const SocialLoginButton = ({ type, handler }: loginBtnProps) => {
return (
<button
css={css`
Expand Down
9 changes: 8 additions & 1 deletion src/types/loginType/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ export const loginTypeProvider = {
kakao: "카카오",
};

// FIXME : 버튼 색 수정 필요
export const backgroundColors: Record<keyof typeof loginTypeProvider, string> = {
kakao: "#ffe400",
google: "#FFFFFF",
apple: "red",
};

type loginProvider = keyof typeof loginTypeProvider;

export type loginType = {
type: loginProvider;
};

export type loginBtnType = {
export type loginBtnProps = {
type: loginProvider;
handler: () => void;
};

0 comments on commit 987a3b7

Please sign in to comment.