<template>
	<view :style="{ height: statusBarHeight }" class="uni-status-bar">
		<slot />
	</view>
</template>

<script>
export default {
	name: 'UniStatusBar',
	data() {
		const info = uni.getWindowInfo();
		const h = info.statusBarHeight ?? 20;
		return {
			statusBarHeight: h + 'px'
		};
	}
};
</script>

<style lang="scss">
.uni-status-bar {
	background: #ffffff;
}
</style>
