Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-platform-searchbar
Advanced tools
Readme
A customizable SearchBar component for React Native. Includes platform specific designs for iOS and Android. Written in Typescript.
npm install react-native-platform-searchbar --save
or yarn add react-native-platform-searchbar
import SearchBar from 'react-native-platform-searchbar';
const Example = () => {
const [value, setValue] = useState('');
<SearchBar
value={value}
onChangeText={setValue}
style={styles.searchBar}
/>;
};
import SearchBar from 'react-native-platform-searchbar';
const Example = () => {
const [value, setValue] = useState('');
<SearchBar
value={value}
onChangeText={setValue}
placeholder="Search"
theme="light"
platform="ios"
style={styles.searchBar}
>
{loading ? (
<ActivityIndicator style={{ marginRight: 10 }} />
) : undefined}
</SearchBar>;
};
Name | Type | Default | Description |
---|---|---|---|
value | string | REQUIRED | SearchBar value |
onChangeText | (string) => void | REQUIRED | called when SearchBar value changes |
theme | "light" | "dark" | "light" | SearchBar theme |
platform | "default" | "ios" | "android" | "default" | which SearchBar version to use. "default" uses current platform |
cancelText | string | "Cancel" | cancel button text. Only visible in iOS SearchBar |
placeholderTextColor | string | different shades of gray depending on theme and platform | Color of placeholderText |
iconColor | string | same as placeholderTextColor | color of icons (Search, Clear...) |
leftIcon | ReactElement | search icon | custom icon to show on the left |
style | object (ViewStyle) | undefined | custom style for the outer container view |
inputStyle | object (TextStyle) | undefined | custom style for the TextInput component |
onCancel | () => void | undefined | callback that gets called when cancel button is pressed |
onClear | () => void | undefined | callback that gets called when clear button is pressed |
All TextInput Props are also supported.
FAQs
A searchbar component for React Native
The npm package react-native-platform-searchbar receives a total of 168 weekly downloads. As such, react-native-platform-searchbar popularity was classified as not popular.
We found that react-native-platform-searchbar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.