feat(ui): 添加自定义关闭按钮组件并应用到所有模态框
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import React from 'react';
|
||||
|
||||
const CloseButton = ({ size = 32, iconSize = 16, className = 'modal-close-btn' }) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
width: size,
|
||||
height: size,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
borderRadius: '8px',
|
||||
transition: 'all 0.25s cubic-bezier(0.4, 0, 0.2, 1)',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
className={className}
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
width={iconSize}
|
||||
height={iconSize}
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
style={{ transition: 'transform 0.25s ease' }}
|
||||
>
|
||||
<line x1="18" y1="6" x2="6" y2="18" />
|
||||
<line x1="6" y1="6" x2="18" y2="18" />
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CloseButton;
|
||||
Reference in New Issue
Block a user