反应原生纸张按钮

问题描述 投票:0回答:1

我正在尝试为文档选择器容器创建一个按钮,并且我希望该按钮具有虚线边框。但是,我面临一个问题,纸张按钮的属性似乎切断了我的边框。我该怎么办?

    <Text>Select Document:</Text>
    <Button
      mode="text"
      icon={"plus"}
      onPress={pickDocument}
      contentStyle={{
        height: 50,
        borderWidth: 1, 
        borderStyle: "dashed",
        borderColor:'#060d60'
      }}
    >
      Select Document{" "}
    </Button>

this is what my code looks like

button expo react-native-paper
1个回答
0
投票

添加

borderRadius:50
与高度值相同

<Text>Select Document:</Text>
    <Button
      mode="text"
      icon={"plus"}
      onPress={pickDocument}
      contentStyle={{
        height: 50,
        borderWidth: 1,  
        borderRadius: 50,
        borderStyle: "dashed",
        borderColor:'#060d60'
      }}
    >
      Select Document{" "}
    </Button>
© www.soinside.com 2019 - 2024. All rights reserved.