npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-hxenavigationbar

v1.0.9

Published

Sohu ERP Mobile HuXiaoE special react-native component.

Readme

react-native-hxenavigationbar

npm npm Platform - iOS and Android

搜狐《狐小e》轻应用React Native默认导航栏组件。

react-native-hxenavigationbar

安装方法:

$ npm i react-native-hxenavigationbar --save

OBJECT参数说明:

参数 | 类型 | 必填 | 说明 :---: | :---: | :---: | :---: navigation | Object | 是 | 屏幕导航属性 title | String | 是 | 标题 backgroundColor | String | 否 | 导航栏背景色的RGBA色彩空间 whiteTint | Boolean | 否 | 导航栏文字和图标的色调,true为白色调,false为黑色调 backButtonHandler | Function | 是 | 点击返回按钮的回调 leftButton | Object | 否 | 左按钮对象(BUTTON OBJECT) rightButton | Object | 否 | 右按钮对象(BUTTON OBJECT) customButton | Object | 否 | 自定义按钮对象(BUTTON OBJECT)

如果backgroundColor值无效,将采用默认导航栏样式。whiteTint仅在backgroundColor有值时有效,且如果whiteTint值无效,将会根据backgroundColor值自动设置

BUTTON OBJECT参数说明:

参数 | 类型 | 必填 | 说明 :---: | :---: | :---: | :---: item | String, Number, Object | 是 | 按钮内容,具体分为“文本标题”(String,如:'按钮标题')、“本地图片”(Number,如:require('./image.png'))、“图片资源”(Object,如:{uri: 'http://www.image.com/image.png'}) handler | Function | 是 | 点击按钮的回调

导航栏按钮从左至右依次为“返回按钮”、“左按钮”、“右按钮”、“自定义按钮”

示例代码:

import hxeNavigationBar from 'react-native-hxenavigationbar'
static navigationOptions = ({navigation}) => {
    return new hxeNavigationBar({
        navigation: navigation,
        title: '页面标题',
        backgroundColor: 'D65946CC',
        whiteTint: true,
        backButtonHandler: () => {
            console.log('点击了返回按钮');
        },
        leftButton: {
            item: '按钮标题',
            handler: () => {
                console.log('点击了左按钮');
            }
        },
        rightButton: {
            item: require('./image.png'),
            handler: () => {
                console.log('点击了右按钮');
            }
        },
        customButton: {
            item: {uri: 'http://www.image.com/image.png'},
            handler: () => {
                console.log('点击了自定义按钮');
            }
        }
    });
};

通过NavigationsetParams方法,修改hxeNavigationBarConfig可以动态改变导航栏

this.props.navigation.setParams({
    'hxeNavigationBarConfig': {
        navigation: this.props.navigation,
        title: '新页面标题',
        backButtonHandler: () => {
            console.log('又点击了返回按钮');
        }
    }
});

License

Apache-2.0 license.