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)
- Segmented Buttons component should have 'disabled' prop HOT 1
- Surface - borderBottomWidth positioning issue on iOS
- Exception is thrown during Jest test when using Paper components.
- Hi, I have built a collaborative video editor with react native paper
- react native project, react-native-vector-icons installed, does not display properly, shows "? HOT 1
- clearButtonMode ignored on TextInput when multiline is true HOT 2
- TextInput.Icon: Support for defaultProps will be removed from function components in a future major release. HOT 3
- Dialog.Title should accept a ref to allow focusing on modal open
- Let Chip get custom accessibility roles
- defaultProps error under react native 0.74 HOT 1
- Blank screen react-native-paper web HOT 4
- Issue with Bottom Tab Bar Delay in React Native Paper Example
- Bottom Navigation Bar doesn't have the correct height
- TextInput only in mode="outlined" Prevent Scrolling Inside a ScrollView.
- How to change the size of AnimatedFAB
- Unable to change Drawer.Item - Divider theme HOT 1
- Text within button is truncated by default if character length of text is a multiple of 5 HOT 1
- Add ability to align FAB group
- Add ability to modify the border width of the ActivityIndicator
- Chip onPress doesn't work on android device HOT 3
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.