Skip to content

Commit abf09e9

Browse files
Merge pull request #67 from SimformSolutionsPvtLtd/develop
Release v1.4.3
2 parents d3e037c + 643a15c commit abf09e9

21 files changed

+184
-274
lines changed

README.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Example of Ripple Effect Button
102102
```jsx
103103
import React from 'react';
104104
import {StyleSheet, Text, View} from 'react-native';
105-
import {Button} from 'react-native-spinner-button';
105+
import SpinnerButton from 'react-native-spinner-button';
106106

107107
const App: React.FC = () => {
108108
const buttonPress: () => void = () => {
@@ -111,13 +111,13 @@ const App: React.FC = () => {
111111

112112
return (
113113
<View style={styles.screen}>
114-
<Button
114+
<SpinnerButton
115115
animationType="ripple-effect"
116116
onPress={buttonPress}
117-
style={styles.btnStyle}
117+
buttonStyle={styles.btnStyle}
118118
animatedDuration={400}>
119119
<Text style={styles.textStyle}>RippleButton</Text>
120-
</Button>
120+
</SpinnerButton>
121121
</View>
122122
);
123123
};
@@ -156,7 +156,7 @@ Props for the spinner button
156156
| Props | Default | Type | Description |
157157
| :-------------------- | :-----: | :---------------------: | :--------------------------------------------------------------------------------------------------- |
158158
| **onPress** | - | function | The function to execute upon tapping the button |
159-
| animationType | null or undefined | string | Type of animation for the button and spinner, For more details about properties, refer [react-native-animatable](https://www.npmjs.com/package/react-native-animatable) |
159+
| animationType | null or undefined | string | Type of animation for the button and spinner, For more details about properties, refer [react-native-animatable](https://www.npmjs.com/package/react-native-animatable) and also support "ripple-effect" |
160160
| buttonStyle | {height: 50} | array or object | Button styling |
161161
| borderStyle | - | array or object | It's a stylesheet object supporting all basic border properties like width, radius, color, and style (solid, dotted, and dashed), etc |
162162
| spinnerColor | white | string | The color of the spinner |
@@ -185,17 +185,7 @@ Props for the spinner button
185185
| disableStyle | - | array or object | It's a stylesheet object. This style applies when identifying the button as disabled or if network connection is not available |
186186
| gradientName | - | string | These properties are used whenever you want to use a gradient but do not pass the gradientColors, gradientColorOffset, and gradientColorAngle properties |
187187
| disableGradientColors | - | array | Colors can be passed in different formats such as names, RGBA, hex, etc. The colors should be ordered in the way we want them to be displayed. For example, with colors={[ "purple", "white" ]}, the gradient will transition from purple to white |
188-
189-
190-
Props for the button
191-
192-
| Props | Default | Type | Description |
193-
| :-------------------- | :-----: | :---------------------: | :--------------------------------------------------------------------------------------------------- |
194-
| **onPress** | - | function | The function to execute upon tapping the button |
195-
| style | - | object | Styling for the button container |
196-
| animatedDuration | 500 | number | Duration of the ripple animation effect |
197188
| rippleColor | rgba(255, 255, 255, .25) | string | Color of the ripple animation effect
198-
| animationType | ripple-effect | string | Type of the animation: ripple-effect |
199189

200190
## Example
201191
A full working example project is here [Example](./example/App/App.tsx)

example/App/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import PulseSpinnerButton from './PulseSpinnerButton';
1010
import SkypeSpinnerButton from './SkypeSpinnerButton';
1111
import UIActivitySpinnerButton from './UIActivitySpinnerButton';
1212
import WaveSpinnerButton from './WaveSpinnerButton';
13-
import CustomButton from './CustomButton';
13+
import RippleEffectButton from './RippleEffectButton';
1414

1515
const App: React.FC = () => {
1616
return (
@@ -24,7 +24,7 @@ const App: React.FC = () => {
2424
<SkypeSpinnerButton />
2525
<UIActivitySpinnerButton />
2626
<WaveSpinnerButton />
27-
<CustomButton />
27+
<RippleEffectButton />
2828
</ScrollView>
2929
);
3030
};

example/App/CustomButton.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

example/App/RippleEffectButton.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from 'react';
2+
import { StyleSheet, Text } from 'react-native';
3+
import SpinnerButton from 'react-native-spinner-button';
4+
import styles from './styles/AppStyles';
5+
6+
const RippleEffectButton: React.FC = () => {
7+
const buttonPress: () => void = () => {
8+
console.log('Button Clicked');
9+
};
10+
11+
return (
12+
<SpinnerButton
13+
buttonStyle={[styles.buttonStyle, style.btnStyle]}
14+
animationType='ripple-effect'
15+
onPress={buttonPress}>
16+
<Text style={styles.buttonText}>RippleButton</Text>
17+
</SpinnerButton>
18+
);
19+
};
20+
21+
const style = StyleSheet.create({
22+
btnStyle: {
23+
backgroundColor: '#893346',
24+
},
25+
});
26+
27+
export default RippleEffectButton;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-spinner-button",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"description": "React Native Spinner Button component library",
55
"author": "Simform Solutions",
66
"main": "lib/index",

src/components/Button/Button.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/components/Button/ButtonTypes.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/components/Button/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/RippleButton/RippleButton.tsx

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/components/RippleButton/RippleButtonStyles.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)