import React from 'react';
import { Toast } from 'react-bootstrap';
export function Confirmation({ toggle }) {
return (
<Toast onClose={() => toggle(false)}>
<Toast.Header>
<strong className="mr-auto">Your Order Is In The Oven!</strong>
<small>just now</small>
</Toast.Header>
<Toast.Body>
Your delicious pizza will be with you in 30 minutes!
</Toast.Body>
</Toast>
);
}
最佳答案
在发布任何问题之前,请先阅读文档。访问https://react-bootstrap.github.io/components/toasts/
改变
import { Toast } from 'react-bootstrap';
与
import Toast from 'react-bootstrap/Toast'
关于javascript - 尝试导入错误: 'Toast' is not exported from 'react-bootstrap' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61370096/