2015-03-05 16:36:41 -08:00
|
|
|
/**
|
2015-03-23 13:35:08 -07:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-03-05 16:36:41 -08:00
|
|
|
*
|
2018-05-10 19:06:46 -07:00
|
|
|
* @format
|
2015-03-05 16:36:41 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2018-03-03 15:04:46 -08:00
|
|
|
const React = require('React');
|
|
|
|
const View = require('View');
|
|
|
|
const StyleSheet = require('StyleSheet');
|
2015-03-05 16:36:41 -08:00
|
|
|
|
2016-07-26 01:00:02 -07:00
|
|
|
class DummyTab extends React.Component {
|
|
|
|
render() {
|
2015-03-05 16:36:41 -08:00
|
|
|
if (!this.props.selected) {
|
|
|
|
return <View />;
|
|
|
|
}
|
|
|
|
return (
|
2018-05-10 19:06:46 -07:00
|
|
|
<View style={[this.props.style, styles.tab]}>{this.props.children}</View>
|
2015-03-05 16:36:41 -08:00
|
|
|
);
|
|
|
|
}
|
2016-07-26 01:00:02 -07:00
|
|
|
}
|
2015-03-05 16:36:41 -08:00
|
|
|
|
2018-03-03 15:04:46 -08:00
|
|
|
const styles = StyleSheet.create({
|
2015-03-05 16:36:41 -08:00
|
|
|
tab: {
|
|
|
|
// TODO(5405356): Implement overflow: visible so position: absolute isn't useless
|
|
|
|
// position: 'absolute',
|
2015-04-10 22:17:49 -07:00
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
left: 0,
|
2015-03-05 16:36:41 -08:00
|
|
|
borderColor: 'red',
|
|
|
|
borderWidth: 1,
|
2018-05-10 19:06:46 -07:00
|
|
|
},
|
2015-03-05 16:36:41 -08:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = DummyTab;
|