Comments (7)
I tried to implement this but ran into a bug when trying to apply an animated value to the offsetShadow height property.
facebook/react-native#3911
So until that issue is resolved there is no way of adding proper material design animations.
from react-native-action-button.
+1
from react-native-action-button.
I need this feature too and I think it can be resolved by adding a _renderButton property on ActionButton, so we can use our customized TouchableNativeFeedback.
from react-native-action-button.
@iSimonWeb how would your renderButton function look like?
from react-native-action-button.
I think it could be a function of (props)
and it should return a React Component.
This could break a lot of your component functionalities set by props, but you can provide an ActionButton.Default (or whatchamacallit) that will rely on the current configuration.
So then, if I don't need a custom button, I can continue to use legacy configuration via props:
<ActionButton size={64} offsetX={20} offsetY={20} buttonColor="#F00" />
either way I can pass my own button that will update based on props
:
<ActionButton size={64} offsetX={20} offsetY={20} renderButton={(props) => <MyActionButton {...props} />} />
We can discuss on positioning. As embedded in my example, position can still be controlled by the ActionButton component wrapping the button in a <View />
and giving to it the current button positioning styles.
from react-native-action-button.
Sorry, I probably wasn't clear with my question. I'm more interested in your MyActionButton
component. How exactly would the implementation of your custom component look like? Maybe we can give the ripple effect to everyone without them having to make use of a custom render method.
from react-native-action-button.
Well then I suppose you can just add a useNativeFeedback
prop to switch TouchableOpacity/TouchableNativeFeedback inside ActionButton._renderButton().
TouchableNativeFeedback additional props are background
and useForeground
, it would be useful to have them configurable too.
Anyway, I'm also trying to shrink the main button size while the sub-items are visible, having a fully customizable renderButton
would perfectly fit for anyone who needs complete control over styles.
from react-native-action-button.
Related Issues (20)
- how to style the button shadow
- Enable scroll on Action Button Items HOT 1
- ActionButton Item click event not working HOT 1
- active opacity does not change
- How to change position a little bit up from default.? HOT 1
- Transparent Background color for ActionButton.Item HOT 1
- Please publish current 2.9.0 version to npmjs.com HOT 2
- Documentation needs to be updated
- Problem with componentWillReceiveProps and ActionButton HOT 4
- Cannot read property 'props' of null HOT 2
- You may need an appropriate loader to handle this file type, currently no loader s are configured to process this fil
- How to place action button above react-navigation tab bar HOT 1
- Centered action button item labels shown on left
- componentWillReceiveProps throws warning HOT 1
- Crashes React Native 0.69.x HOT 6
- Is the library still maintained? HOT 3
- Issues on Android 13? HOT 1
- Invariant Violation: ViewPropTypes has been removed from React Native HOT 1
- onReset property does not exist
- componentWillReceiveProps has been renamed + useNativeDriver HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-action-button.