how to custom style in `FAB.Group`
See original GitHub issueCurrent behaviour
from L301-L313
we can see there is no prop set the root FAB’s style
but in here
we can change the sub fab use style
Expected behaviour
let me change the root fab’s background color not use the theme provider
PS:
sorry, use theme also cannot change the backgroundColor, because there is no theme prop in parent FAB.Group
, the FAB
cannot get the theme.colors. accent
.
Code sample
just copy from here: https://callstack.github.io/react-native-paper/fab-group.html
Your Environment
software | version |
---|---|
react-native-paper | 2.2.6 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
How to change background color of FAB.Group from react ...
You almost had it, just change line below style={styles.fab}. for this other one fabStyle={styles.fab}.
Read more >FAB.Group · React Native Paper
Style for the FAB. It allows to pass the FAB button styles, such as backgroundColor. variant. Available in v5.x with theme version 3....
Read more >Building a floating action button (FAB) component - web.dev
Start with a .fabs class for CSS to hook into for style, then add role="group" and aria-label so it's not just a generic...
Read more >How to create custom FAB(Floating Action Button) in React ...
Example: Open the FAB.js file and write the below code in that file. This file contains the code for the custom FAB component....
Read more >FAB - React Native Elements
Props Includes all Button props. Change the color of the FAB. FAB placement at bottom, (optional) use style in case of custom placement....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To change the background color of the FAB you can pass the
accent
color in theme:Though it’ll be useful to add a
fabStyle
prop which passes the styles to the underlying fab.@lutakyn it’s an open source project. pull requests to documentation are welcome.