Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions src/Tab.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import React, { Component } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { View, ViewPropTypes } from 'react-native';
import {View, ViewPropTypes} from 'react-native';

class Tab extends Component {
static propTypes = {
children: PropTypes.node,
heading: PropTypes.string.isRequired,
containerStyle: ViewPropTypes.style,
}

render() {
return (
<View style={this.props.containerStyle}>
{this.props.children}
</View>
);
}
function Tab({children, containerStyle}) {
return <View style={containerStyle}>{children}</View>;
}
Tab.propTypes = {
children: PropTypes.node,
heading: PropTypes.string.isRequired,
containerStyle: ViewPropTypes.style,
};

export default Tab;
export default Tab;
Loading