Bil*_*een 2 react-native react-native-elements
如何将react-native-elements按钮的标题分成多行?
import { Button } from 'react-native-elements';
....
// The \n in the following statement does NOT work!
<Button
title="Creating a Shift \n(and inviting employees)"
onPress={ () => {
console.log("Button Pressed");
}}
/>
Run Code Online (Sandbox Code Playgroud)
您需要将标题文本括在大括号中。
<Button
title={"Creating a Shift \n(and inviting employees)"}
onPress={ () => {
console.log("Button Pressed");
}}
/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4003 次 |
| 最近记录: |