1.0.3 • Published 5 months ago

react-native-customreusablebutton v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

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

PropTypeDescriptionDefault
titlestringThe text displayed on the button.-
onPress() => voidFunction to execute when button is pressed.-
isButtonDisabledbooleanDisables the button when true.false
iconSourceImageSourcePropTypeOptional image/icon to display on the button.undefined
styleStyleProp<ViewStyle>Custom style for the button container.undefined
textStyleStyleProp<TextStyle>Custom style for the button text.undefined
imageStyleStyleProp<ImageStyle>Custom style for the button image.undefined
activeOpacitynumberOpacity effect when button is pressed.0.7
1.0.3

5 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago