callstack / callstack/react-native-paper

Better Avatar component

未关闭
#4,862 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
feature request
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

**Is your feature request related to a problem? Please describe.**
The current Avatar component(s) do the job, but they can do it better. Handling Avatar.Image and Avatar.Text is painful with if/else since it doesn't support fallback.

**Describe the solution you'd like**
A small refactor to the Avatar component to support Image mainly, and fallback to Text

Example:
```typescript


P

```

**Describe alternatives you've considered**
Manually checking for image loading, if it fails then I need to render Avatar.Text instead.

贡献指南

打开贡献指南

调研方向

首先定位 Avatar 组件及其现有的 Avatar.Image 和 Avatar.Text 入口点。在实现所要求的 AvatarImage 和 AvatarFallback 用法之前,查看附近组件的测试;当图像不可用时能够显示文本并渲染图像,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native, typescript
领域
mobile
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。