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 🙏

© 2024 – Pkg Stats / Ryan Hefner

x-react-tooltip

v1.0.10

Published

react tooltip

Downloads

16

Readme

x-react-tooltip组件

简介

x-react-tooltip组件是基于react封装的,用于所有需要tooltip场景的使用

特点:

  • 可以进行简单的tooltip使用
  • header和body彻底分离,可以高度定制化,可以任意放入任何内容

安装

npm install --save-dev x-react-tooltip

使用

import {Tooltip} from 'x-react-tooltip'
<Tooltip position="right">
    <Tooltip.Header>头部内容</Tooltip.Header>
    <Tooltip.Body>
        <div>需要hover展现的内容</div>
    </Tooltip.Body>
</Tooltip>

参数

  • Tooltip

| 参数 | 类型 | 值 | 含义 | | ------ | ------ | ------ | ------ | | className | string | 无默认值 | 样式class | | position | string | 'top','bottom','right','left'四个值中的一个,默认为'bottom' | tooltip内容展现的位置 | | style | object | 无默认值 | 行内样式 | | disabled | bool | 默认为false | 是否禁用 | | arrow | bool | 默认为true | 是否展示箭头 | | distance | number | 默认为15px | 表示header与body之间的距离(单位:px) | | onMouseIn | function | 无默认值 | tooltip鼠标移入时的callback | | onMouseOut | function | 无默认值 | tooltip鼠标移出时的callback |

  • Tooltip.Header

| 参数 | 类型 | 值 | 含义 | | ------ | ------ | ------ | ------ | | style | object | 无默认值 | 行内样式 |

  • Tooltip.Body

| 参数 | 类型 | 值 | 含义 | | ------ | ------ | ------ | ------ | | style | object | 无默认值 | 行内样式 |

开发

npm start

项目启动后直接访问 localhost:9001 即可看到展示页面

打包发布

npm run build

npm publish

版本信息

  • v1.0.10

    功能:

    1.tooltip基本功能

    缺陷

    1.没有加上页面滚动后,自动重新定位body内容的功能,下一个版本迭代加上