showCloseButton react-bootstrap-未显示 sweetalert

showCloseButton react-bootstrap-sweetalert not displayed

我正在使用库 react-bootstrap-sweetalert 来处理弹出窗口。到目前为止,一切都很好。但是,当我尝试实现他们的道具之一时,showCloseButton - 描述为 here -, the close button not displayed anywhere in my alert. Then, I try to copy-paste the code in their example here,这里是代码:

<SweetAlert
  custom
  showCancel
  showCloseButton
  confirmBtnText="Yes"
  cancelBtnText="No"
  confirmBtnBsStyle="primary"
  cancelBtnBsStyle="default"
  customIcon="https://raw.githubusercontent.com/djorg83/react-bootstrap-sweetalert/master/demo/assets/thumbs-up.jpg"
  title="Do you like thumbs?"
  onConfirm={this.onConfirm}
  onCancel={this.onCancel}
>
  You will find they are up!
</SweetAlert>

"x" 关闭按钮仍然没有显示在我的警报中。然后,我尝试在他们的示例中显示警报,显示关闭按钮!这里出了什么问题?我已经复制粘贴了,它不起作用。但是,它正在他们的示例站点上工作。无论如何,我正在使用 react-bootstrap-sweetalert^4.4.1 版本。

我认为该示例是针对其最新版本的。请更新到最新!

因为我在v4.4.1中看不到选项showCloseButton: https://www.npmjs.com/package/react-bootstrap-sweetalert/v/4.4.1