import * as React from "react"; import {View, ViewProps, ViewStyle} from 'react-native'; export interface MaterialContainerProps extends ViewProps { toolbar?():React.ReactNode, isRoot?: boolean, children?:React.ReactNode, style?: ViewStyle } export default function MaterialContainer ({isRoot = false, children = null , toolbar= null, style={} }: MaterialContainerProps) { return { isRoot && {toolbar()} } {children} ; };