mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at verify-code 37 lines 988 B view raw
1import React from 'react' 2import {StyleSheet, View} from 'react-native' 3import {Text} from 'view/com/util/text/Text' 4import {InfoCircleIcon} from 'lib/icons' 5import {s, colors} from 'lib/styles' 6import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' 7 8export function HelpTip({text}: {text: string}) { 9 const bg = useColorSchemeStyle( 10 {backgroundColor: colors.gray1}, 11 {backgroundColor: colors.gray8}, 12 ) 13 const fg = useColorSchemeStyle({color: colors.gray5}, {color: colors.gray4}) 14 return ( 15 <View style={[styles.helptip, bg]}> 16 <View style={styles.icon}> 17 <InfoCircleIcon size={18} style={fg} strokeWidth={1.5} /> 18 </View> 19 <Text type="xs-medium" style={[fg, s.ml5, s.flex1]}> 20 {text} 21 </Text> 22 </View> 23 ) 24} 25 26const styles = StyleSheet.create({ 27 icon: { 28 width: 18, 29 }, 30 helptip: { 31 flexDirection: 'row', 32 alignItems: 'flex-start', 33 borderRadius: 6, 34 paddingHorizontal: 10, 35 paddingVertical: 8, 36 }, 37})