|
| 1 | + |
| 2 | + |
| 3 | +<h1 align='center'>Action button</h1> |
| 4 | +<p align='center'>Simple button.</p> |
| 5 | +<p align="center"> |
| 6 | + <a href="https://github.com/wniemiec-components-reactnative/action-button/actions/workflows/windows.yml"><img src="https://github.com/wniemiec-components-reactnative/action-button/actions/workflows/windows.yml/badge.svg" alt=""></a> |
| 7 | + <a href="https://github.com/wniemiec-components-reactnative/action-button/actions/workflows/macos.yml"><img src="https://github.com/wniemiec-components-reactnative/action-button/actions/workflows/macos.yml/badge.svg" alt=""></a> |
| 8 | + <a href="https://github.com/wniemiec-components-reactnative/action-button/actions/workflows/ubuntu.yml"><img src="https://github.com/wniemiec-components-reactnative/action-button/actions/workflows/ubuntu.yml/badge.svg" alt=""></a> |
| 9 | + <a href="https://reactnative.dev/"><img src="https://img.shields.io/badge/React Native-0.60+-D0008F.svg" alt="React Native compatibility"></a> |
| 10 | + <a href="https://github.com/wniemiec-components-reactnative/action-button/releases"><img src="https://img.shields.io/github/v/release/wniemiec-components-reactnative/action-button" alt="Release"></a> |
| 11 | + <a href="https://github.com/wniemiec-components-reactnative/action-button/blob/master/LICENSE"><img src="https://img.shields.io/github/license/wniemiec-components-reactnative/action-button" alt="License"></a> |
| 12 | +</p> |
| 13 | +<hr /> |
| 14 | + |
| 15 | +## ❇ Introduction |
| 16 | +React Native component that allows you to press a button to perform a certain action, in addition to allowing the programmer to choose the button style according to your preference. |
| 17 | + |
| 18 | +## 🖼 Gallery |
| 19 | + |
| 20 | +<div style="display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap" |
| 21 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img1.png" alt="image 1" /> |
| 22 | + |
| 23 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img2.png" alt="image 2" /> |
| 24 | + |
| 25 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img3.png" alt="image 3" /> |
| 26 | + |
| 27 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img4.png" alt="image 4" /> |
| 28 | + |
| 29 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img5.png" alt="image 5" /> |
| 30 | + |
| 31 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img6.png" alt="image 6" /> |
| 32 | + |
| 33 | +<img height=400 src="https://raw.githubusercontent.com/wniemiec-components-reactnative/action-button/master/docs/img/screens/img7.png" alt="image 7" /> |
| 34 | +</div> |
| 35 | + |
| 36 | +## ❓ How to use |
| 37 | +1. Install the component |
| 38 | +``` |
| 39 | +$ npm install --save @wniemiec-component-reactnative/action-button |
| 40 | +``` |
| 41 | + |
| 42 | +2. Import the component |
| 43 | +``` |
| 44 | +import ActionButton from '@wniemiec-component-reactnative/action-button'; |
| 45 | +``` |
| 46 | + |
| 47 | +3. Use it |
| 48 | +``` |
| 49 | +[...] |
| 50 | +
|
| 51 | +import React from 'react'; |
| 52 | +
|
| 53 | +[...] |
| 54 | +
|
| 55 | +<ActionButton |
| 56 | + title="Action Button" |
| 57 | + onPress={() => alert('Hey! You clicked on me!')} |
| 58 | +/> |
| 59 | +[...] |
| 60 | +``` |
| 61 | + |
| 62 | +## 📖 Documentation |
| 63 | +| Property |Type|Description|Default| |
| 64 | +|----------------|-------------------------------|-----------------------------|--------| |
| 65 | +|title |`string`|Button label | - | |
| 66 | +|onPress |`function(void): void`|Function that is called when the button is pressed| - | |
| 67 | +|bgColor |`string`|Background color (in hexadecimal) |`"#233287"`| |
| 68 | +|fgColor |`string`|Foreground color (in hexadecimal) |`"#FFFFFF"`| |
| 69 | +|full |`boolean`|Indicates whether the width should be 100% |`false`| |
| 70 | + |
| 71 | +## 🚩 Changelog |
| 72 | +Details about each version are documented in the [releases section](https://github.com/wniemiec-components-reactnative/action-button/releases). |
| 73 | + |
| 74 | +## 🤝 Contribute! |
| 75 | +See the documentation on how you can contribute to the project [here](https://github.com/wniemiec-components-reactnative/action-button/blob/master/CONTRIBUTING.md). |
| 76 | + |
| 77 | +## 📁 Files |
| 78 | + |
| 79 | +### / |
| 80 | +| Name |Type|Description| |
| 81 | +|----------------|-------------------------------|-----------------------------| |
| 82 | +|docs |`Directory`|Documentation files| |
| 83 | +|src |`Directory`| Source files| |
0 commit comments