react-native-navigation-bar-height
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

react-native-navigation-bar-height

Get android's navigation bar height when app has been focused

Installation

yarn add react-native-navigation-bar-height

Usage

/**
 * Copyright 2024 Whatssub Co., Ltd. All rights reserved.
 *
 * This source code is licensed under the
 * LICENSE file in the root directory of this source tree.
 */

import { StyleSheet, View, Text } from 'react-native';

import { useAndroidNavigationBarHeight } from 'react-native-navigation-bar-height';

const App = () => {
  const height = useAndroidNavigationBarHeight();

  return (
    <View style={styles.container}>
      <Text>Result: {height}</Text>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  box: {
    width: 60,
    height: 60,
    marginVertical: 20,
  },
});

export default App;

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i react-native-navigation-bar-height

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

24.7 kB

Total Files

20

Last publish

Collaborators

  • taeyoon0137