callstack / callstack/react-native-paper

left and right prop of TextInput should accept other than icons

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

描述

I was going through `TextInput` props and saw that `left` prop only accepts below

> It can be either TextInput.Icon or TextInput.Affix

In material UI (MUI) react web version, start accepts `Icon` as well as other type of `React.ReactNode`

I was trying to do something like this

```js
console.log('Remove chip')}
style={{ marginRight: 4 }}
>
Apple

}
right={
loading ? (
} />
) : undefined
}
/>
```
Image

I know there might be some workaround like wrapper pattern, Is it possible that RNP provides this feature internally ?

MUI --
Image

I want to achieve something like this in terms of UI

Thanks

贡献指南

打开贡献指南

调研方向

首先阅读 TextInput 的 prop 定义以及其左侧和右侧元素的实现。将当前对 TextInput.Icon 和 TextInput.Affix 的处理与所要求的 Chip 和 ActivityIndicator 示例进行比较。完成应意味着两个 prop 都支持示例中的非图标内容,同时保留现有支持的形式。

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

评估

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

把新 issue 发到你的邮箱

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