npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-mybuttonlibrary

v1.0.7

Published

It's a Library for Custom Button

Readme

CustomButton Component

The CustomButton is a highly customizable React Native button component that supports text, icons, and various styling options. It is designed to be flexible and easy to integrate into your React Native projects.

Installation

To use the CustomButton component in your project, you can install it via npm:

npm install 'react-native-mybuttonlibrary'

Usage

To use the CustomButton component, simply import it into your React Native project and include it in your JSX:

import React from 'react';

import { View } from 'react-native';

import CustomButton from 'custom-button';

const App = () => {

const handlePress = () => { console.log('Button Pressed!');

};

return (

<View>

  <CustomButton
    buttonText="Click Me"
    onPress={handlePress}
    buttonStyle={{ backgroundColor: 'green' }}
    textStyle={{ color: 'white' }}
  />

</View>

); };

export default App;

Props

| Prop Name | Type | Description | Default Value | |-----------------------|-------------------------------|------------------------------------------------------------|---------------| | onPress | () => void | Function to be called when the button is pressed. | Required | | buttonText | string | The text to be displayed inside the button. | Required | | iconSource | ImageSourcePropType | The source of the icon to be displayed alongside the text. | undefined | | buttonStyle | StyleProp<ViewStyle> | Custom styles for the button container. | undefined | | iconStyle | StyleProp<ImageStyle> | Custom styles for the icon. | undefined | | textStyle | StyleProp<TextStyle> | Custom styles for the button text. | undefined | | isButtonDisabled | boolean | If true, the button will be disabled and styled accordingly. | false |

Styles

const styles = StyleSheet.create({

disabledButton:

{ backgroundColor: 'white', alignItems: 'center', justifyContent: 'center', alignSelf: 'center', width: '85%', marginTop: 44, borderRadius: 10, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.8, shadowRadius: 3, elevation: 5, paddingVertical: 15, },

submitButton: { flexDirection: 'row', backgroundColor: '#5698D3', alignItems: 'center', justifyContent: 'center', alignSelf: 'center', width: '85%', marginTop: 44, borderRadius: 10, paddingVertical: 15, },

submitButtonText: { color: 'white', fontSize: 16, fontWeight: 'bold', },

disabledButtonText: { color: '#ccc', fontSize: 16, fontWeight: 'bold', },

icon: { width: 28, height: 28, resizeMode: 'contain', },

});

Example

Here’s an example of how you can use the CustomButton with an icon and custom styles:

import React from 'react'; import { View } from 'react-native'; import CustomButton from 'custom-button'; import Icon from 'react-native-vector-icons/FontAwesome';

const App = () => { const handlePress = () => { console.log('Button with Icon Pressed!'); };

return (

<View>

  <CustomButton
    buttonText="Click Me"
    onPress={handlePress}
    iconSource={Icon}
    buttonStyle={{ backgroundColor: 'purple', paddingHorizontal: 20 }}
    textStyle={{ color: 'white', fontSize: 18 }}
    iconStyle={{ tintColor: 'white', marginRight: 10 }}
  />

</View>

); };

export default App;

Contributing

If you'd like to contribute to this project, please fork the repository and submit a pull request. We welcome contributions of all kinds, including bug fixes, feature additions, and documentation improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have any questions, please open an issue on the GitHub repository.

This version has been structured using appropriate headers, code blocks, tables for props, and sections for installation, usage, styling, and contribution in the standard README.md format.