react笔记之学习之添加弹框提示

前言

我是歌谣 我有个兄弟 巅峰的时候排名c站总榜19 叫前端小歌谣 曾经我花了三年的时间创作了他 现在我要用五年的时间超越他 今天又是接近兄弟的一天人生难免坎坷 大不了从头再来 歌谣的意志是永恒的 放弃很容易 但是坚持一定很酷 微信公众号前端小歌谣 关注公众号带你进入前端学习交流群

在这里插入图片描述

js部分 model.js

import './ComfirmModal.css';
import Card from "../Card/Card";
const ConfirmModal = props => {
return <Card className="confirmModal">
<div className="confirmText">
<p>该操作不可恢复!确认吗?</p>
</div>
<div className="confirmButton">
<button className="okButton">确认</button>
<button>取消</button>
</div>
</Card>;
};
export default ConfirmModal;

样式 model.css

.confirmModal{
display: flex;
flex-flow: column;
width: 400px;
height: 200px;
padding: 10px;
background-color: #fff;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
.confirmText{
display: flex;
height: 150px;
justify-content: center;
align-items: center;
font-size: 22px;
color: #D62828;
}
.confirmButton{
flex: auto;
display: flex;
justify-content: flex-end;
}
.confirmButton button{
width: 80px;
margin: 0 10px;
border: none;
background-color: #EAE2B7;
font-weight: bold;
font-size: 18px;
}
.confirmButton .okButton{
background-color: #D62828;
color: white;
}
posted @   前端导师歌谣  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
历史上的今天:
2021-12-21 歌谣2021|自学转行的程序员的年终总结
点击右上角即可分享
微信分享提示