Coder Social home page Coder Social logo

rcaferati / react-native-really-awesome-button Goto Github PK

View Code? Open in Web Editor NEW
1.2K 15.0 125.0 8 MB

React Native button component. Awesome Button is a 3D at 60fps, progress enabled, social ready, extendable, production ready component that renders an awesome animated set of UI buttons. 📱

Home Page: https://expo.io/@rcaferati/react-native-really-awesome-button

License: MIT License

JavaScript 11.63% TypeScript 88.37%
button component react react-native progress social share animated

react-native-really-awesome-button's Issues

The onPress function gets invoked when you scroll through it

If the button is inside a ScrollView, it invokes the onPress function just scrolling through the view when the gesture starts from the button. It is like when you touch and move, it acts like touch and release. Any idea on how to solve it?

20190423_030821

Issue with the documentation @textFamily

Hey man, I would like to first thank you for his awesome contribution! really nice keep them coming perhaps maybe next we can make icons look like these buttons!

I would like you to fix something in the documentation please. it says to change the fontFamily use textFamily prop. However, it is actually textFontFamily. Also, it says its of type number while it is actually a string.

Hope this helps!

add support for hitSlop

Button is currently pretty finicky to interact with. It'd be great if really-awesome-button accepted all TouchableWithoutFeedback props, but hitSlop is a good start. PR incoming.

More detailed styling options for creating button groups

I'd like to smush a couple of react-native-really-awesome-buttons together into a row and make something like this:
image

But the styling options don't let me control border radius by corner instead of as a whole. Using the style property with fields like borderBottomRightRadius and borderTopRightRadius seems to have no effect. Can you expose border corner radiuses as properties, or at least make them work via the styles property?

Transparent picture button

image

This is a sad story. I tried to use activityColor activeOpacity backgroundActive backgroundColor backgroundDarker these parameters. But there is no way to make the background color transparent.

image

This library is generally good, but it does not meet the demand. Can only give up.

Text inside button gets cropped

I have used the button with the text Get this reward, however the button renders just Get this.


flat-button


Is there something I could change to fix this? I have tried all the props already.

Question - textFamily

Hi, nice buttons really helpfull! I've a question. How can I set the textFamily? I've tried textFamily={Fonts.type.rock} where Fonts.type.rock returns a custom font that I've linked. The font is working in other View. Thanks in advance!

Gradient Background?

Thanks for this component!

However, is it possible to use a Linear Gradient background for the awesome button?

Crashes on Android

Whenever I run it on the Android simulator, I get java.lang.string cannot be cast to java.lang.double

Accept relative widths (percentages)

I'm testing out the component (which is great btw), but I lack support for relative widths.

In my scenario, I'd like to be able to provide percentages in order to fill the full screen width (100%) when having a simple action button in the screen footer, or 50% if I have an accept/cancel situation.

Would you find this useful?

A document problem

hey:
stretch
type Boolean
default false
When set to true together with width set to null the button fills it's parent component width

I set the stretch as true and witdh as null,the typescript show a error,

Type 'number | null' is not assignable to type 'number | undefined'

I set witdh as undefined fix this problem

so , I think docs where null maybe is undefined 😋

buttons are pressed on scroll

i have three large awesome buttons in a column. when i want to scroll the page, buttons are press and navigate to another page. this issue does not happen on react native touchable components.

is onPress memoized?

Is the onPress prop memoized? Because if it is, there is an issue since I am using state in onPress and it using the wrong state.

Using Expo SDK 46

It seems like onPressIn works because it is directly being passed into the component, but ideally I would like to use onPress as it is significantly better UX.

Here is a reproducible demo: https://snack.expo.dev/@anshnanda/awesomebutton-not-working

Buttons unresponsive in Expo SDK 39

Updated the SDK this morning, buttons were working perfectly yesterday, totally unresponsive after updating the Expo SDK

Running on android emulator

Problem with the colors?

Hi! Is there a bug with colors?

Because I cannot get the proper colors, despite I enter them correctly. My goal button is this:

image

However, I get this, I believe it is the use of the react-native-linear-gradient that fails? Also the text "Play" is not centered.

image

This is my component:

<AwesomeButton
      // size="small"
      // type="primaryFlat"
      activityColor="#FFFFFF"
      activeOpacity={1}
      // backgroundColor="red"
      backgroundDarker="#143254"
      backgroundShadow="#143254"
      backgroundPlaceholder="#143254"
      backgroundProgress="#C0C0C0"
      borderColor="#143254"
      borderRadius={5}
      borderWidth={3}
      height={50}
      width={null}
      paddingHorizontal={20}
      paddingTop={0}
      paddingBottom={0}
      stretch={false}
      disabled={false}
      raiseLevel={3}
      // ExtraContent={null}
      springRelease={true}
      onPress={null}
      progress={false}
      progressLoadingTime={3000}
      textColor="#FFFFFF"
      textLineHeight={20}
      textSize={14}
      textFontFamily="Proxima Nova Regular"
      ExtraContent={<LinearGradient colors={['#143254', '#3D638E', '#3D638E']} />}
    >
      {text}
    </AwesomeButton>

Thanks!

Hair trigger when overlaying other button

Situation: Using a start and pause button, one "covering" the other using inline conditional control
Issue: The pause and start onPress-handlers accidentally fires when the other button is pressed (hair trigger).
Troubleshooting: Using react native Button-element removes the issue.

{!isPaused ?
    <AwesomeButton
                    ripple
                    onPress={() => timerStart()}
                    disabled={!isValid}
                        > Start
     </AwesomeButton>
                    : 
    <AwesomeButton
                            backgroundColor="crimson"
                            backgroundDarker="darkred"
                            ripple
                            onPress={() => dispatch(pauseTimer())}
                                > Paused
       </AwesomeButton>
 }

Expo needs update please

This project uses Expo SDK v33.0.0. If you want to open this project, the author will need to update the project's SDK version.

Seems like a neat project!

Button fires on swiping

Love this repo but and have used it quite a lot. Thanks for the time and effort for putting it together!

Big issue though! It seems to work fine within the bounds of a View, (Mostly because you arent swiping up or down in a view)
But you place it within a ScrollView and youll see it fires everytime you try to swipe up or down and accidently hit it. Native buttons dont fire like that and has caused great annoyance to many of my users. Currently investigating a fix and will report back if i should find one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.