forked from yelloworld-bot/yelloworld
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
232 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,46 @@ | ||
import React from 'react'; | ||
import React, { forwardRef } from 'react'; | ||
import classNames from 'classnames'; | ||
|
||
import { ButtonProps } from './Button.types'; | ||
import { ButtonWrapper } from './Button.styled'; | ||
import { SerializedStyles, css } from '@emotion/react'; | ||
|
||
export const Button = ({ | ||
type = 'button', | ||
className, | ||
size, | ||
disabled = false, | ||
radius = true, | ||
backgroundColor, | ||
onClick, | ||
style, | ||
children, | ||
}: ButtonProps) => { | ||
return ( | ||
<> | ||
<ButtonWrapper | ||
type={type} | ||
className={classNames(className)} | ||
size={size} | ||
disabled={disabled} | ||
radius={radius} | ||
onClick={(e) => { | ||
if (onClick) { | ||
onClick(e); | ||
} | ||
}} | ||
backgroundColor={backgroundColor} | ||
css={style as SerializedStyles} | ||
> | ||
{children} | ||
</ButtonWrapper> | ||
</> | ||
); | ||
}; | ||
// eslint-disable-next-line react/display-name | ||
export const Button = forwardRef( | ||
( | ||
{ | ||
type = 'button', | ||
className, | ||
size, | ||
disabled = false, | ||
radius = true, | ||
backgroundColor, | ||
onClick, | ||
style, | ||
children, | ||
}: ButtonProps, | ||
ref, | ||
) => { | ||
return ( | ||
<> | ||
<ButtonWrapper | ||
type={type} | ||
className={className} | ||
size={size} | ||
disabled={disabled} | ||
radius={radius} | ||
onClick={(e) => { | ||
if (onClick) { | ||
onClick(e); | ||
} | ||
}} | ||
backgroundColor={backgroundColor} | ||
css={style as SerializedStyles} | ||
ref={ref} | ||
> | ||
{children} | ||
</ButtonWrapper> | ||
</> | ||
); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
|
||
import { BodyMedium, Spacing } from '@/component'; | ||
import { Button } from '@/component/Button'; | ||
|
||
import yello_question_svg from '@/component/Icon/asset/yello-question.svg'; | ||
import { pallete } from '@/styles/Color'; | ||
import Link from 'next/link'; | ||
|
||
export default function Custom404() { | ||
return ( | ||
<section className='w-screen h-screen flex flex-col justify-center items-center text-white'> | ||
<div className='unbounded-600 text-2xl'>{'404 ERROR'}</div> | ||
<Spacing size={20} /> | ||
<Image | ||
src={yello_question_svg} | ||
alt='yello_question' | ||
width={128} | ||
height={128} | ||
/> | ||
<Spacing size={32} /> | ||
<BodyMedium className='text-center text-white'> | ||
{'다시 접속하거나,\n인터넷 연결을 다시 확인해주세요'} | ||
</BodyMedium> | ||
<Spacing size={64} /> | ||
<Link href={'/school-attack'}> | ||
<Button | ||
className='text-black' | ||
size='L' | ||
backgroundColor={pallete['yello-main-500']} | ||
> | ||
{'홈으로 돌아가기'} | ||
</Button> | ||
</Link> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters