(Multi-Line) 按钮换行

Line Break in (Multi-Line) Buttons

如何将 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");
    }}
/>

您需要将标题文本括在花括号中。

<Button
    title={"Creating a Shift \n(and inviting employees)"}
    onPress={ () => {
        console.log("Button Pressed");
    }}
/>