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

@teamix/avatar

v1.1.3

Published

Avatar Component

Downloads

76

Readme

Teamix Avatar (迁移自旧版 AT Avatar 组件)

开发指南

样式前缀

如需给 Avatar 内部所用到的 @teamix/ui 组件指定 prefix,可添加 uiPrefix 参数(如 uiPrefix='aone-')

API

Avatar

| 参数 | 说明 | 类型 | 默认值 | |------|-----|-----|-------| |style|设置组件样式| Object | - | |className|设置组件className| String | - | |size|设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl'| String|'medium'| |img|设置头像图片地址,必填| String|-| |text|设置头像旁文案,必填| String|-| |closable|是否显示关闭按钮| Boolean|true| |onClose|点击关闭回调| Function|() => {}| |onClick|点击头像回调| Function|() => {}|

Avatar.TextAvatar

| 参数 | 说明 | 类型 | 默认值 | |------|-----|-----|-------| |style|设置组件样式| Object | - | |className|设置组件className| String | - | |size|设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl'| String|'medium'| |text|设置头像文案,必填| String|-| |colorSets|头像背景色集,会根据text的charCode选取其中一个作为背景色|String数组|['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492']|

Avatar.ImageAvatar

| 参数 | 说明 | 类型 | 默认值 | |------|-----|-----|-------| |style|设置组件样式| Object | - | |className|设置组件className| String | - | |size|设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl'| String|'medium'| |img|设置头像图片地址,必填| String|-|

Avatar.ClusterAvatar

| 参数 | 说明 | 类型 | 默认值 | |------|-----|-----|-------| |style|设置组件样式| Object | - | |className|设置组件className| String | - | |dataSource|头像群数据源,数组成员见下方,必填| Array|-| |colorSets|头像背景色集,img不存在时会根据text的charCode选取其中一个作为背景色|String数组|['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492']| |onSelect|点击单个头像回调,入参为该头像相关参数| Function|(data) => {}| |onClose|关闭单个头像回调,入参为该头像相关参数| Function|(data) => {}| |onAdd|点击添加回调| Function|() => {}|

Avatar.GroupAvatar

| 参数 | 说明 | 类型 | 默认值 | |------|-----|-----|-------| |style|设置组件样式| Object | - | |className|设置组件className| String | - | |colorSets|头像背景色集,img不存在时会根据text的charCode选取其中一个作为背景色|String数组|['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492']| |dataSource|头像群数据源,数组成员见下方,必填| Array|-| |onClickMore|点击更多回调| Function|() => {}| |showMore|hover到...是否显示更多用户| Boolean | false | |align|用户名字展示位置| Enum | 'b', (参考:https://teamix.space-x.alibaba-inc.com/ui/balloon?theme=yunxiao) |

dataSource成员

| 参数 | 说明 | 类型 | 默认值 | |------|-----|-----|-------| |img|头像图片地址| String | - | |text|头像对应文案,必填| String | - | |id|头像对应id,必填| String or Number|-|