-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FEAT] 로그인박스 추가 #27
[FEAT] 로그인박스 추가 #27
Changes from 2 commits
bdcad80
1872b82
3c421da
241b3c2
c8a0f5d
457ed7a
cad9dbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.loginBox { | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 8px 8px 12px; | ||
gap: 8px; | ||
position: relative; | ||
width: 727px; | ||
height: 570px; | ||
background: #FFFFFF; | ||
border: 1px solid #EFEFF0; | ||
border-radius: 12px; | ||
} | ||
|
||
.logo { | ||
margin-bottom: 0px; | ||
width: 256px; | ||
height: 256px; | ||
} | ||
|
||
.button { | ||
margin: 10px 0; | ||
cursor: pointer; | ||
width: 600px; | ||
height: 90px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 로그인박스와 마찬가지로 |
||
border-radius: 12px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { LoginBox } from './LoginBox'; | ||
|
||
const meta = { | ||
title: 'Components/LoginBox', | ||
component: LoginBox, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
} satisfies Meta<typeof LoginBox>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@/utils/test-utils'; | ||
import { LoginBox } from './LoginBox'; | ||
import '@testing-library/jest-dom'; | ||
|
||
describe('LoginBox component', () => { | ||
it('renders correctly', () => { | ||
render(<LoginBox />); | ||
expect(screen.getByAltText('Logo')).toBeInTheDocument(); | ||
expect(screen.getByAltText('카카오 로그인')).toBeInTheDocument(); | ||
expect(screen.getByAltText('네이버 로그인')).toBeInTheDocument(); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import classes from './LoginBox.module.css'; | ||
|
||
export function LoginBox() { | ||
return ( | ||
<div className={classes.loginBox}> | ||
<img src="/images/S-TopLogo.png" alt="Logo" className={classes.logo} /> | ||
<img src="/images/kakaoLoginButton.png" alt="카카오 로그인" className={classes.button} /> | ||
<img src="/images/naverLoginButton.png" alt="네이버 로그인" className={classes.button} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 로그인 버튼을 이미지 대신 크기가 유동적일 수 있게 Mantine Button을 사용해서 만들면 어떨까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mantine button으로 수정하였습ㄴㅣ다 |
||
</div> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인박스의 width와 height를 고정해두지 말고
style={{width: width, height: height}}
와 같이 하면 어떨까요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
최대한 맞춰서 변경해보았습니다