- 게시물 카드 슬라이드 7종, 좋아요·댓글, 텍스트 공유 - 시트 7종(RN Modal), 위 막대 지역·계절·로그인/아바타 - 각·노을·주말·행사·계절·상식 탭, 당겨서 새로고침 - 히어로 해·구름·비·눈 움직임, 스켈레톤 깜빡임, 첫 로딩 덮개, 하늘색 전환
104 lines
2.9 KiB
TypeScript
104 lines
2.9 KiB
TypeScript
import { View } from 'react-native';
|
|
|
|
import { Skel } from '@/components/ui';
|
|
|
|
const TEN = Array.from({ length: 10 }, (_, i) => i);
|
|
const THREE = [0, 1, 2];
|
|
|
|
export const DAY_W = 'w-[46px]';
|
|
export const PLACE_CARD = 'w-[178px] overflow-hidden rounded-[22px] border-b-[5px] border-shade bg-card';
|
|
export const EVENT_CARD = 'mx-3 mt-2.5 flex-row items-center gap-3 rounded-[22px] border-b-[5px] border-shade bg-card p-3';
|
|
|
|
export function DaysSkel() {
|
|
return (
|
|
<View className="flex-row gap-1 overflow-hidden px-3 pt-3">
|
|
{TEN.map((i) => (
|
|
<View key={i} className={`${DAY_W} items-center gap-1 rounded-[18px] border-b-4 border-shade bg-card pt-[9px] pb-2`}>
|
|
<Skel className="w-3" />
|
|
<View className="size-7 rounded-full bg-skel" />
|
|
<Skel className="w-6" />
|
|
<Skel className="w-5" />
|
|
</View>
|
|
))}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
export function PickSkel() {
|
|
return (
|
|
<View className="mx-3 mt-3 flex-row items-center gap-3.5 rounded-3xl border-b-[5px] border-shade bg-card p-4">
|
|
<View className="size-16 rounded-full bg-skel" />
|
|
<View className="flex-1 gap-1.5">
|
|
<Skel className="h-4 w-32" />
|
|
<Skel className="w-4/5" />
|
|
<Skel className="mt-1 w-36" />
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
export function PlacesSkel() {
|
|
return (
|
|
<View className="flex-row gap-2.5 overflow-hidden px-4 pt-3 pb-1">
|
|
{THREE.map((i) => (
|
|
<View key={i} className={PLACE_CARD}>
|
|
<View className="h-[104px] bg-skel" />
|
|
<View className="gap-1.5 px-3 pt-2.5 pb-3">
|
|
<Skel className="w-16" />
|
|
<Skel className="h-4 w-24" />
|
|
<Skel className="w-full" />
|
|
<Skel className="w-20" />
|
|
</View>
|
|
</View>
|
|
))}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
export function EventSkel() {
|
|
return (
|
|
<View className={EVENT_CARD}>
|
|
<View className="h-[84px] w-[84px] rounded-2xl bg-skel" />
|
|
<View className="flex-1 gap-1.5">
|
|
<Skel className="h-4 w-40" />
|
|
<Skel className="h-4 w-20" />
|
|
<Skel className="w-44" />
|
|
<Skel className="w-24" />
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
export function EventsSkel() {
|
|
return (
|
|
<>
|
|
{THREE.map((i) => (
|
|
<EventSkel key={i} />
|
|
))}
|
|
</>
|
|
);
|
|
}
|
|
|
|
export function RankSkel() {
|
|
return (
|
|
<View className="mx-3 mt-1.5">
|
|
{TEN.map((i) => (
|
|
<View key={i} className="flex-row items-center gap-2.5 border-b-[1.5px] border-line px-1 py-3">
|
|
<View className="w-[34px] items-center">
|
|
<Skel className="w-5" />
|
|
</View>
|
|
<View className="flex-1 gap-1.5">
|
|
<Skel className="h-4 w-24" />
|
|
<Skel className="w-40" />
|
|
<View className="h-1.5 rounded-full bg-skel" />
|
|
</View>
|
|
<View className="flex-row items-center gap-1">
|
|
<View className="size-6 rounded-full bg-skel" />
|
|
<Skel className="w-9" />
|
|
</View>
|
|
</View>
|
|
))}
|
|
</View>
|
|
);
|
|
}
|