【问题标题】:icon is not working in react native paper text input图标在反应本机纸张文本输入中不起作用
【发布时间】:2023-02-25 05:23:17
【问题描述】:

代码

<TextInput
    mode="outlined"
    label="Enter Password"
    outlineColor="#000"
    activeOutlineColor="#0073D9"
    right={<TextInput.Icon name="eye" />}
    style={{
        backgroundColor: '#eee', marginRight: scale(20),
        marginLeft: scale(20),
    }}
    value={Pass}
    onChangeText={(text) => setPass(text)}
/>

输出

如何在 React Native Paper 文本输入中添加图标?

【问题讨论】:

    标签: javascript reactjs react-native lib


    【解决方案1】:

    在 TextInput 和更多图标中添加 secureTextEntry - https://pictogrammers.com/library/mdi/

    <TextInput
          label="Password"
          secureTextEntry
          right={<TextInput.Icon icon="eye" />}
        />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-10
      • 1970-01-01
      • 2021-04-07
      • 1970-01-01
      • 1970-01-01
      • 2021-12-08
      相关资源
      最近更新 更多