Yaltopia-Tickets-App/components/ShadowWrapper.tsx
2026-03-01 14:43:12 +03:00

32 lines
754 B
TypeScript

import React from "react";
import { View, ViewProps, Platform } from "react-native";
import { cn } from "@/lib/utils";
interface ShadowWrapperProps extends ViewProps {
level?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
children: React.ReactNode;
className?: string;
}
export function ShadowWrapper({
level = "md",
className,
children,
...props
}: ShadowWrapperProps) {
const shadowClasses = {
none: "",
xs: "shadow-sm shadow-slate-200/30",
sm: "shadow-sm shadow-slate-200/50",
md: "shadow-md shadow-slate-200/60",
lg: "shadow-xl shadow-slate-200/70",
xl: "shadow-2xl shadow-slate-300/40",
};
return (
<View className={cn(shadowClasses[level], className)} {...props}>
{children}
</View>
);
}