Surface

Surface is a basic container that can give depth to an element with elevation shadow. A shadow can be applied by specifying the elevation property both on Android and iOS.

Usage

import * as React from 'react';
import { Surface, Text } from 'react-native-paper';
import { StyleSheet } from 'react-native';

const MyComponent = () => (
  <Surface style={styles.surface}>
     <Text>Surface</Text>
  </Surface>
);

export default MyComponent;

const styles = StyleSheet.create({
  surface: {
    padding: 8,
    height: 80,
    width: 80,
    alignItems: 'center',
    justifyContent: 'center',
    elevation: 4,
  },
});

Props

children (required)
Type: React.Node

Content of the Surface.

style
Type: any
theme
Type: Theme