reactjs - 在 React Native 上更改按钮字体大小
问题描述
我正在尝试更改我的 react 本机应用程序上的 Button 字体大小,但出现错误。有谁知道如何正确地做到这一点?谢谢你。
解决方案
您可以将 react-native-elements 与titleStyle
props 一起使用。
import {Input, Button} from 'react-native-elements';
<Button
onPress={this.addPicture}
titleStyle={{
color: "white",
fontSize: 16,
}}
buttonStyle={{
backgroundColor: "white",
borderRadius: 60,
flex: 1,
height: 30,
width: 30,
}}
title="+"
/>
推荐阅读
- ios - 线程 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) 当字符超过
- android - 等待线程完成 OkHttp 调用
- html - 如何在底部构建一个复杂的表格,如图像?
- python - matplotlib 子图 - IndexError:数组索引过多
- python - 如何定义一个引用范围内先前值的函数?
- php - 如何构建查询以通过交易历史查找所有权?
- c# - 允许超过 20 亿个字符的字符串的 C# StringBuilder 版本
- express - express-minify 无法对 es6 脚本进行 uglify,如何使用 babel 将转译后的脚本传递给 express-minify?
- android - removeAt 删除最后一项而不是索引中所述的项
- cassandra - Cassandra reaper - 我也应该修复 reapers 数据库吗?