Bluesky app fork with some witchin' additions 馃挮 witchsky.app
bluesky fork client
119
fork

Configure Feed

Select the types of activity you want to include in your feed.

at a876aae44ea07494ebea9727350aa060b81f317b 46 lines 1.5 kB view raw
1import {Children, cloneElement, Fragment, isValidElement} from 'react' 2import {View} from 'react-native' 3 4import {atoms, useTheme} from '#/alf' 5 6/** 7 * NOT FINISHED, just here as a reference 8 */ 9export function InputGroup(props: React.PropsWithChildren<{}>) { 10 const t = useTheme() 11 const children = Children.toArray(props.children) 12 const total = children.length 13 return ( 14 <View style={[atoms.w_full]}> 15 {children.map((child, i) => { 16 return isValidElement(child) ? ( 17 <Fragment key={i}> 18 {i > 0 ? ( 19 <View 20 style={[atoms.border_b, {borderColor: t.palette.contrast_500}]} 21 /> 22 ) : null} 23 {cloneElement(child, { 24 // @ts-ignore 25 style: [ 26 // @ts-ignore 27 ...(Array.isArray(child.props?.style) 28 ? // @ts-ignore 29 child.props.style 30 : // @ts-ignore 31 [child.props.style || {}]), 32 { 33 borderTopLeftRadius: i > 0 ? 0 : undefined, 34 borderTopRightRadius: i > 0 ? 0 : undefined, 35 borderBottomLeftRadius: i < total - 1 ? 0 : undefined, 36 borderBottomRightRadius: i < total - 1 ? 0 : undefined, 37 borderBottomWidth: i < total - 1 ? 0 : undefined, 38 }, 39 ], 40 })} 41 </Fragment> 42 ) : null 43 })} 44 </View> 45 ) 46}