Comments (1)
Hey, I could be wrong, but it looks like there is no easy way to solve your problem. I haven't found a way to override the top style. I think in your case it is also problematic that the icon container has a fixed height (it is based on the Material Design specification). Therefore, the icon is not aligned correctly because your icon size is 30dp, while in the Material specification is 24dp. To have an aligned icon, you can either set the icon size to 24dp or try adjusting the position with a negative value for the top style if the icon, for example :
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarIcon: ({ color, size }) => {
return (
<Icon
name="home"
size={size}
color={color}
style={{ top: -4 }} // <- THIS
/>
);
},
}}
/>
However, I cannot guarantee that this will not cause other unforeseen problems
I know that these are not the best solutions. Maybe at least one of them will at least be enough until someone else provides a better one?
from react-native-paper.
Related Issues (20)
- Text Input label position HOT 5
- onPress Card don't work after upgrade Expo to 51 HOT 4
- Modal flickering on closeing HOT 2
- Multiline text in SegmentedButtonItem
- Problem with the "BottomNavigation.Bar" component example (route.title) HOT 2
- Timeline to official New Architecture support? HOT 1
- useTheme function need more explanation HOT 1
- TextInput autofocus is not opening keyboard on Android HOT 4
- Shadow Appears on Disabled, Selected Flat Chip When Rendered Next to Outlined Chip in Same Row HOT 5
- Merge and release the pending PR HOT 1
- Text is truncated when nested with different sizes. HOT 1
- TextInput not styling properly on version 5.12.4 HOT 3
- Select component?
- Fab.Group forgot to remove the click event of the fab label
- Tootip import module error HOT 3
- Multiline TextInput backgroundColor does not fully cover surface HOT 3
- After deleting a letter from the text input, the cursor will move back one letter's position HOT 2
- @react-native-vector-icons monorepo as new default?
- Getting error when running example project: ApiV2Error: Entity Not Authorized. HOT 1
- Add support or recommendation for Material Symbols icons
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-paper.