-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] 무한 스크롤, 로딩 인디케이터, 엠티 뷰, 오류 alert
- Loading branch information
Showing
29 changed files
with
577 additions
and
225 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import TicleCharacter from '@/assets/images/ticle-character.png'; | ||
import cn from '@/utils/cn'; | ||
|
||
interface EmptyProps { | ||
title?: string; | ||
className?: string; | ||
imageSize?: number; | ||
} | ||
|
||
function Empty({ title = '항목이 비어있어요!', className, imageSize = 180 }: EmptyProps) { | ||
return ( | ||
<div | ||
className={cn( | ||
'custom-dashed flex h-96 w-full flex-col items-center justify-center gap-8', | ||
className | ||
)} | ||
> | ||
<img | ||
src={TicleCharacter} | ||
alt="흑백 티클 캐릭터" | ||
className="grayscale" | ||
width={imageSize} | ||
height={imageSize} | ||
/> | ||
<h1 className="text-head2 text-weak">{title}</h1> | ||
</div> | ||
); | ||
} | ||
|
||
export default Empty; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
import { cva } from 'class-variance-authority'; | ||
|
||
const dotVariants = cva('h-4 w-4 rounded-full', { | ||
variants: { | ||
variant: { | ||
white: ['animate-[flashWhite_1.5s_ease-out_infinite_alternate] bg-altWeak'], | ||
primary: ['animate-[flashPrimary_1.5s_ease-out_infinite_alternate] bg-secondary'], | ||
}, | ||
position: { | ||
first: '', | ||
second: '[animation-delay:0.5s]', | ||
third: '[animation-delay:1s]', | ||
}, | ||
}, | ||
defaultVariants: { | ||
variant: 'white', | ||
}, | ||
}); | ||
|
||
type LoadingProps = { | ||
color?: 'white' | 'primary'; | ||
}; | ||
|
||
const Loading = ({ color = 'white' }: LoadingProps) => ( | ||
<div className="flex gap-5"> | ||
<div className={dotVariants({ variant: color, position: 'first' })} /> | ||
<div className={dotVariants({ variant: color, position: 'second' })} /> | ||
<div className={dotVariants({ variant: color, position: 'third' })} /> | ||
</div> | ||
); | ||
|
||
export default Loading; |
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
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
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
Oops, something went wrong.