Live video on the AT Protocol
at eli/github-skip-darwin 45 lines 885 B view raw
1import { View } from "tamagui"; 2 3const maxContainerWidths = { 4 xxs: 440, 5 xs: 440, 6 sm: 440, 7 md: 660, 8 lg: 740, 9 xl: 800, 10 twoXl: 1260, 11 threeXl: 1660, 12}; 13 14export default function Container({ children, ...props }) { 15 return ( 16 <View f={1} justifyContent="flex-start" alignItems="center"> 17 <View 18 width="100vw" 19 px="$4" 20 mx="auto" 21 $gtXxs={{ maxWidth: maxContainerWidths.sm, px: "$4" }} 22 $gtXs={{ 23 maxWidth: maxContainerWidths.lg, 24 px: "$4", 25 }} 26 $gtLg={{ 27 maxWidth: maxContainerWidths.xl, 28 29 px: "$4", 30 }} 31 $gtXl={{ 32 maxWidth: maxContainerWidths.twoXl, 33 px: "$4", 34 }} 35 $gtXxl={{ 36 maxWidth: maxContainerWidths.threeXl, 37 px: "$4", 38 }} 39 {...props} 40 > 41 {children} 42 </View> 43 </View> 44 ); 45}