aport-tools 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +60 -0
- package/package.json +1 -1
package/README.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# React Native Button
|
2
|
+
|
3
|
+
A customizable React Native button component with various styling options.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```bash
|
8
|
+
npm install react-native-button
|
9
|
+
# or
|
10
|
+
yarn add react-native-button
|
11
|
+
Peer Dependencies
|
12
|
+
Ensure that you have react and react-native installed in your project.
|
13
|
+
|
14
|
+
bash
|
15
|
+
Copy code
|
16
|
+
npm install react react-native
|
17
|
+
# or
|
18
|
+
yarn add react react-native
|
19
|
+
Usage
|
20
|
+
jsx
|
21
|
+
Copy code
|
22
|
+
import React from 'react';
|
23
|
+
import { View } from 'react-native';
|
24
|
+
import { Button } from 'react-native-button';
|
25
|
+
|
26
|
+
const App = () => {
|
27
|
+
const handlePress = () => {
|
28
|
+
console.log('Button Pressed!');
|
29
|
+
};
|
30
|
+
|
31
|
+
return (
|
32
|
+
<View style={{ padding: 20 }}>
|
33
|
+
<Button
|
34
|
+
type="submit"
|
35
|
+
onPress={handlePress}
|
36
|
+
isFullWidth
|
37
|
+
rounded
|
38
|
+
>
|
39
|
+
Submit
|
40
|
+
</Button>
|
41
|
+
</View>
|
42
|
+
);
|
43
|
+
};
|
44
|
+
|
45
|
+
export default App;
|
46
|
+
Props
|
47
|
+
Name Type Default Description
|
48
|
+
disabled boolean false Disables the button if set to true.
|
49
|
+
isFullWidth boolean false Expands the button to full width if set to true.
|
50
|
+
children string undefined Text content of the button.
|
51
|
+
onPress () => void undefined Function to call when the button is pressed.
|
52
|
+
rounded boolean true Adds border radius if set to true.
|
53
|
+
borderRadius number 30 Custom border radius value.
|
54
|
+
type "submit" | "button" | "cancel" "button" Specifies the button type for styling.
|
55
|
+
Styling
|
56
|
+
The button styles can be customized via props such as type, rounded, borderRadius, and isFullWidth. You can also modify the colors module to match your design requirements.
|
57
|
+
|
58
|
+
License
|
59
|
+
MIT
|
60
|
+
```
|