refactor(app-header): move back button to right side
This commit is contained in:
@@ -8,18 +8,18 @@ interface AppHeaderProps {
|
||||
export default function AppHeader({ title, showBack, onBack, rightActions }: AppHeaderProps) {
|
||||
return (
|
||||
<div className="app-header">
|
||||
<div className="app-header-left">
|
||||
<h2 className="app-header-title">{title}</h2>
|
||||
<div className="app-header-right">
|
||||
{showBack && onBack && (
|
||||
<button className="page-back-btn" onClick={onBack}>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="15 18 9 12 15 6" />
|
||||
</svg>
|
||||
返回
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="9 18 15 12 9 6" />
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
<h2 className="app-header-title">{title}</h2>
|
||||
{rightActions}
|
||||
</div>
|
||||
{rightActions && <div className="app-header-right">{rightActions}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user