-
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.
스켈레톤 UI 개발 및 적용
- Loading branch information
Showing
7 changed files
with
197 additions
and
82 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
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,36 @@ | ||
import Skeleton from '../Skeleton/Skeleton' | ||
|
||
export interface LinkItemSkeletonProps { | ||
type?: 'list' | 'card' | ||
} | ||
|
||
const LinkItemSkeleton = ({ type }: LinkItemSkeletonProps) => { | ||
return ( | ||
<> | ||
{type === 'list' ? ( | ||
<div className="flex items-center justify-between gap-2 border-t border-slate3 px-3 py-2 last:border-b"> | ||
<Skeleton className="h-5 w-3/4" /> | ||
</div> | ||
) : ( | ||
<div className="flex"> | ||
<div className="mr-4 flex min-h-[101.5px] w-[214.47px] flex-col justify-between gap-1 rounded-md border border-slate3 px-3 py-2.5"> | ||
<Skeleton className="h-5 w-4/5" /> | ||
<Skeleton className="h-5 w-10" /> | ||
<div className="flex items-center justify-end"> | ||
<Skeleton className="h-5 w-10" /> | ||
</div> | ||
</div> | ||
<div className="mr-4 flex min-h-[101.5px] w-[214.47px] flex-col justify-between gap-1 rounded-md border border-slate3 px-3 py-2.5"> | ||
<Skeleton className="h-5 w-4/5" /> | ||
<Skeleton className="h-5 w-10" /> | ||
<div className="flex items-center justify-end"> | ||
<Skeleton className="h-5 w-10" /> | ||
</div> | ||
</div> | ||
</div> | ||
)} | ||
</> | ||
) | ||
} | ||
|
||
export default LinkItemSkeleton |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import SpaceSkeleton from '../Space/SpaceSkeleton' | ||
|
||
const MainSpaceSkeleton = () => { | ||
return ( | ||
<ul className="flex flex-col gap-y-2 px-4 pt-2"> | ||
<li> | ||
<SpaceSkeleton type="Card" /> | ||
</li> | ||
<li> | ||
<SpaceSkeleton type="Card" /> | ||
</li> | ||
<li> | ||
<SpaceSkeleton type="Card" /> | ||
</li> | ||
<li> | ||
<SpaceSkeleton type="Card" /> | ||
</li> | ||
<li> | ||
<SpaceSkeleton type="Card" /> | ||
</li> | ||
</ul> | ||
) | ||
} | ||
|
||
export default MainSpaceSkeleton |
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,14 @@ | ||
interface SkeletonProps { | ||
className?: string | ||
} | ||
|
||
const Skeleton = ({ className }: SkeletonProps) => { | ||
return ( | ||
<div | ||
className={ | ||
className + ' rounded-xl bg-slate-100 dark:bg-slate-800 ' | ||
}></div> | ||
) | ||
} | ||
|
||
export default Skeleton |
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 Skeleton from '../Skeleton/Skeleton' | ||
|
||
interface SpaceSkeletonProps { | ||
type?: 'Card' | 'Header' | ||
} | ||
|
||
const SpaceSkeleton = ({ type }: SpaceSkeletonProps) => { | ||
return ( | ||
<> | ||
{type === 'Card' ? ( | ||
<div className="relative flex gap-3 rounded-md border border-slate3 p-2"> | ||
<div className="flex grow flex-col justify-center gap-1 rounded-md bg-white bg-opacity-60 px-3 py-1.5 dark:bg-gray-900 dark:bg-opacity-60"> | ||
<Skeleton className="h-5 w-1/2" /> | ||
<Skeleton className="h-5 w-1/2" /> | ||
<div className="flex justify-between"> | ||
<Skeleton className="h-5 w-20" /> | ||
<Skeleton className="h-5 w-20" /> | ||
</div> | ||
</div> | ||
</div> | ||
) : ( | ||
<div className="relative flex flex-col gap-10 rounded-md border border-slate3 p-4"> | ||
<div className="flex justify-end gap-2"> | ||
<Skeleton className="h-5 w-20" /> | ||
<Skeleton className="h-5 w-20" /> | ||
</div> | ||
<div className="flex flex-col gap-1.5 rounded-md border border-slate3 bg-white bg-opacity-60 px-3 py-1.5 dark:bg-gray-900 dark:bg-opacity-60"> | ||
<Skeleton className="h-5 w-1/2" /> | ||
<Skeleton className="h-4 w-1/3" /> | ||
<Skeleton className="h-5 w-20" /> | ||
</div> | ||
</div> | ||
)} | ||
</> | ||
) | ||
} | ||
|
||
export default SpaceSkeleton |