2015-03-06 00:36:41 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2015-03-23 20:35:08 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00: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-06 00:36:41 +00:00
|
|
|
*
|
2018-05-11 02:06:46 +00:00
|
|
|
* @format
|
2015-03-06 00:36:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2018-03-03 23:04:46 +00:00
|
|
|
const React = require('React');
|
|
|
|
const View = require('View');
|
|
|
|
const StyleSheet = require('StyleSheet');
|
2015-03-06 00:36:41 +00:00
|
|
|
|
2016-07-26 08:00:02 +00:00
|
|
|
class DummyTab extends React.Component {
|
|
|
|
render() {
|
2015-03-06 00:36:41 +00:00
|
|
|
if (!this.props.selected) {
|
|
|
|
return <View />;
|
|
|
|
}
|
|
|
|
return (
|
2018-05-11 02:06:46 +00:00
|
|
|
<View style={[this.props.style, styles.tab]}>{this.props.children}</View>
|
2015-03-06 00:36:41 +00:00
|
|
|
);
|
|
|
|
}
|
2016-07-26 08:00:02 +00:00
|
|
|
}
|
2015-03-06 00:36:41 +00:00
|
|
|
|
2018-03-03 23:04:46 +00:00
|
|
|
const styles = StyleSheet.create({
|
2015-03-06 00:36:41 +00:00
|
|
|
tab: {
|
|
|
|
// TODO(5405356): Implement overflow: visible so position: absolute isn't useless
|
|
|
|
// position: 'absolute',
|
2015-04-11 05:17:49 +00:00
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
left: 0,
|
2015-03-06 00:36:41 +00:00
|
|
|
borderColor: 'red',
|
|
|
|
borderWidth: 1,
|
2018-05-11 02:06:46 +00:00
|
|
|
},
|
2015-03-06 00:36:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = DummyTab;
|