1.0.4 ā€¢ Published 3 years ago

@freakycoder/react-native-button v1.0.4

Weekly downloads
23
License
MIT
Repository
github
Last release
3 years ago

Battle Tested āœ…

Fully customizable, Gradient, Outline and Solid Button for React Native.

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

React Native

npm i @freakycoder/react-native-button

Peer Dependencies

IMPORTANT! You need install them
"react-native-vector-icons": ">= 6.x.x",
"react-native-linear-gradient": ">= 2.5.x",
"react-native-dynamic-vector-icons": ">= x.x.x"

Button Component Options

  • Button (ClassicButton)
  • GooglePlayButton (Material Design 2)

Import

import { Button, GooglePlayButton } from "@freakycoder/react-native-button";

GooglePlayButton Usage (Material Design 2)

Solid

<GooglePlayButton text="Open" textColor="#fff" rippleColor="white" />

Outline

<GooglePlayButton outline text="Uninstall" />

Button Usage (Classic Button)

Gradient Button Usage

<Button gradient textColor="white" shadowColor="#ff738b" />

Solid Background Usage

<Button
  solid
  textColor="white"
  shadowColor="#ff738b"
  backgroundColor="#FFAFBD"
/>

Outline Button Usage

<Button outline color="#ff738b" textColor="#ff738b" borderColor="#ff738b" />

Configuration - Props

Button Props

PropertyTypeDefaultDescription
textstringnullset the button's text
solidbooleanfalsemake the button with a solid background and a shadow
outlinebooleantruemake the button outline
gradientbooleanfalsemake the button with a gradient background and a shadow
iconDisablebooleanfalsedisable the left icon if you want
backgroundColorcolor#757575change the solid's background color
stylestyledefaultset/override the style for the button's style
textStylestyledefaultset/override style for the button's text style
shadowStylestyledefaultset/override style for the button's shadow style
outlineStylestyledefaultset/override style for the button's outline style

GooglePlayButton Props

PropertyTypeDefaultDescription
textstringnullset the button's text
solidbooleanfalsemake the button with a solid background and a shadow
outlinebooleantruemake the button outline
gradientbooleanfalsemake the button with a gradient background and a shadow
iconDisablebooleanfalsedisable the left icon if you want
backgroundColorcolor#757575change the solid's background color
stylestyledefaultset/override the style for the button's style
textStylestyledefaultset/override style for the button's text style
textColorcolordefaultset button's text color
shadowStylestyledefaultset/override style for the button's shadow style
outlineStylestyledefaultset/override style for the button's outline style
onPressfunctiondefaultset the onPress functionality

Icon Props

PropertyTypeDefaultDescription
namestringstarchange the icon name from React Native Vector Icons
typestringFontAwesomechange the icon type from React Native Vector Icons
colorcolorwhitechange the icon color
sizenumber15change the icon size

ToDos

  • LICENSE
  • Typescript Challenge & Code Cleaning
  • Expo Version
  • Write an article about the lib on Medium

Change Log

0.2.0 (2019-09-07)

Full Changelog

āš  BREAKING CHANGE: Way of import is changed! GooglePlayButton with newest Material Design 2 is added šŸŽ‰

Merged pull requests:

0.0.15 (2019-08-17)

* This Change Log was automatically generated by github_changelog_generator

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Button Library is available under the MIT license. See the LICENSE file for more info.

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.11

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.1

5 years ago