Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@teamix/avatar
Advanced tools
如需给 Avatar 内部所用到的 @teamix/ui 组件指定 prefix,可添加 uiPrefix 参数(如 uiPrefix='aone-')
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
size | 设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl' | String | 'medium' |
img | 设置头像图片地址,必填 | String | - |
text | 设置头像旁文案,必填 | String | - |
closable | 是否显示关闭按钮 | Boolean | true |
onClose | 点击关闭回调 | Function | () => {} |
onClick | 点击头像回调 | Function | () => {} |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
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'] |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
size | 设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl' | String | 'medium' |
img | 设置头像图片地址,必填 | String | - |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
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 | () => {} |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
colorSets | 头像背景色集,img不存在时会根据text的charCode选取其中一个作为背景色 | String数组 | ['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492'] |
dataSource | 头像群数据源,数组成员见下方,必填 | Array | - |
onClickMore | 点击更多回调 | Function | () => {} |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
img | 头像图片地址 | String | - |
text | 头像对应文案,必填 | String | - |
id | 头像对应id,必填 | String or Number | - |
FAQs
Avatar Component
We found that @teamix/avatar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 21 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.