react-native-customreusablebutton

1.0.3 • Public • Published

CustomButton Component

A customizable button component for React Native with optional icon support.

Installation

Ensure you have React Native installed in your project before using this component.

Usage

import React from 'react';

import { View, Alert } from 'react-native';

import CustomButton from 'react-native-customReusableButton';

const App = () => {

return (

<View>

  <CustomButton

    title="Click Me"

    onPress={() => Alert.alert('Button Pressed!')}

    iconSource={require('./path-to-icon.png')} // Optional icon

  />

</View>

);

};

export default App;

Props

Prop Type Description Default
title string The text displayed on the button. -
onPress () => void Function to execute when button is pressed. -
isButtonDisabled boolean Disables the button when true. false
iconSource ImageSourcePropType Optional image/icon to display on the button. undefined
style StyleProp<ViewStyle> Custom style for the button container. undefined
textStyle StyleProp<TextStyle> Custom style for the button text. undefined
imageStyle StyleProp<ImageStyle> Custom style for the button image. undefined
activeOpacity number Opacity effect when button is pressed. 0.7

Readme

Keywords

Package Sidebar

Install

npm i react-native-customreusablebutton

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

6.44 kB

Total Files

6

Last publish

Collaborators

  • muskangoel2711