import { SymbolView } from "../../components/AppSymbol"; import { Platform, Pressable } from "react-native"; import { useThemeColor } from "../../lib/useThemeColor"; import { AppText as Text } from "../../components/AppText"; import { cn } from "../../lib/cn"; const CARD_SHADOW = Platform.select({ ios: { shadowColor: "rgba(23,23,23,0.08)", shadowOffset: { width: 0, height: 4 }, shadowOpacity: 1, shadowRadius: 16, }, android: { elevation: 3 }, }); const CARD_SHADOW_DARK = Platform.select({ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.18, shadowRadius: 8, }, android: { elevation: 4 }, }); export { CARD_SHADOW, CARD_SHADOW_DARK }; export function ConnectionSheetButton(props: { readonly icon: React.ComponentProps["name"]; readonly label: string; readonly disabled?: boolean; readonly tone?: "primary" | "secondary" | "danger"; readonly compact?: boolean; readonly onPress: () => void; }) { const tone = props.tone ?? "secondary"; const primaryFg = useThemeColor("--color-primary-foreground"); const dangerFg = useThemeColor("--color-danger-foreground"); const secondaryFg = useThemeColor("--color-secondary-foreground"); const textColor = tone === "primary" ? primaryFg : tone === "danger" ? dangerFg : secondaryFg; const primaryShadow = tone === "primary" ? Platform.select({ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 3 }, shadowOpacity: 0.14, shadowRadius: 6, }, android: { elevation: 3 }, }) : undefined; return ( {props.label} ); }