@wniemiec-component-reactnative/selectable-button
v1.0.2
Published
Simple selectable button.
Maintainers
Readme

❇ Introduction
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 theme according to your preference.
🖼 Gallery
❓ How to use
- Install the component
$ npm install --save @wniemiec-component-reactnative/selectable-button- Import the component
import SelectableButton from '@wniemiec-component-reactnative/selectable-button';- Use it
[...]
import React, { useState } from 'react';
[...]
const [isSelected, setIsSelected] = useState(true);
[...]
<SelectableButton
title="Click me"
onPress={() => {setIsSelected(!isSelected)}}
selected={isSelected}
/>
[...]📖 Documentation
| Property |Type|Description|Default|
|----------------|-------------------------------|-----------------------------|--------|
|title |string|Button label | - |
|onPress |function(void): void|Function that is called when the button is pressed| - |
|selected |boolean|Clicked status | - |
|bgColor |string|Background color (in hexadecimal) |"#01786F"|
|fgColor |string|Foreground color (in hexadecimal) |"#FFFFFF"|
|size |string|Button size (big, regular or small) |"regular"|
|full |boolean|Indicates whether the width should be 100% |false|
🚩 Changelog
Details about each version are documented in the releases section.
🤝 Contribute!
See the documentation on how you can contribute to the project here.
📁 Files
/
| Name |Type|Description|
|----------------|-------------------------------|-----------------------------|
|docs |Directory|Documentation files|
|src |Directory| Source files|
