import React, {useCallback, useRef, useState} from 'react'; import {Alert} from 'react-native'; import {Colors, View, Text, Switch, SearchInput, SearchInputRef, Button, Icon, Assets} from 'react-native-ui-lib'; const SearchInputScreen = () => { const [showCancelBtn, setShowCancelBtn] = useState(false); const [showLoader, setShowLoader] = useState(false); const [showCustomRightElement, setShowCustomRightElement] = useState(false); const searchInput = useRef(); const onChangeText = (text: string) => { console.log('UILIB text: ', text); }; const onDismiss = useCallback(() => { Alert.alert('Cancel was pressed'); }, []); const customRightElement = ( ); return ( SearchInput Search Input Presets: Default: Prominent: Settings: setShowCancelBtn(value)} onColor={Colors.$iconSuccessLight} /> Toggle cancel button setShowCustomRightElement(value)} onColor={Colors.$iconSuccessLight} /> Toggle Custom right element setShowLoader(value)} onColor={Colors.$iconSuccessLight}/> Toggle loader Actions: on the first example