my fork of the bluesky client
at main 49 lines 957 B view raw
1import {View} from 'react-native' 2 3import { 4 atoms as a, 5 flatten, 6 TextStyleProp, 7 useTheme, 8 ViewStyleProp, 9} from '#/alf' 10import {Props} from '#/components/icons/common' 11import {Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' 12 13export function IconCircle({ 14 icon: Icon, 15 size = 'xl', 16 style, 17 iconStyle, 18}: ViewStyleProp & { 19 icon: typeof Growth 20 size?: Props['size'] 21 iconStyle?: TextStyleProp['style'] 22}) { 23 const t = useTheme() 24 25 return ( 26 <View 27 style={[ 28 a.justify_center, 29 a.align_center, 30 a.rounded_full, 31 { 32 width: size === 'lg' ? 52 : 64, 33 height: size === 'lg' ? 52 : 64, 34 backgroundColor: t.palette.primary_50, 35 }, 36 flatten(style), 37 ]}> 38 <Icon 39 size={size} 40 style={[ 41 { 42 color: t.palette.primary_500, 43 }, 44 flatten(iconStyle), 45 ]} 46 /> 47 </View> 48 ) 49}