Comments (3)
@ahmedlhanafy I don't think so. I'd rather do
<Layer {...this.props} elevation={2} />
than doing
<View {...this.props} style={[ this.props.style, { elevation: elevationToShadow(2) } ]} />
to avoid unnecessary boilerplate everywhere.
from react-native-paper.
@satya164 i think this can be a function that takes an elevation value and returns the correct shadow, doing a component here is overkill
from react-native-paper.
We can take inspiration from the paper from material-ui.
I second satya, on creating a component over here. It may have a certain padding
and transition
. Also, since elevation
is android only, i'd suggest something like below for styles
// Layer component definition
render() {
<View style=[theme.prepareElevation(this.props.elevation), { otherStyles }] >
{this.props.children}
</View>
}
from react-native-paper.
Related Issues (20)
- Usage of defaultProps HOT 2
- fontWeight and custom fontFamily are not working properly together. HOT 3
- Unable to Remove Persistent Shadow from Modal Component in React Native Paper HOT 1
- Documentation about the use of react-native-safe-area-context HOT 5
- Allow Drawer.Item to wrap across multiple lines
- SearchBar's clearIcon to have ability to always stay visible
- The tutorial suggests using App.js but this is missing when creating a project? HOT 2
- Icons "triangle-down" and "triangle-down-outline" don't exist HOT 1
- How can I install "react-native-paper/react-navigation"? HOT 4
- Warning: TextInput.Icon: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. HOT 3
- Using Portal and a TextInput with "value=" inside it makes the Backspace key to not behave properly when using finger sliding to write on Android HOT 2
- Badge font-scaling handling doesn't work on iOS
- Button showing weird behaviour HOT 2
- DataTable.Pagination numberOfItemsPerPageList appears in the wrong position HOT 1
- Can you please add Ratting component? HOT 1
- Fix hover support to web for Drawer.Item component HOT 2
- How can I change icon position using BottomNavigation.Bar in a Tab.Navigator
- How can I change icon position using BottomNavigation.Bar in a Tab.Navigator HOT 1
- [Android] TextInput, ActivityIndicator and Modal make rn SectionList stickySectionHeadersEnabled not work correctly HOT 7
- Shadow Issue with Colored React Native Elements in TextInput Label HOT 5
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.