наверное работает

This commit is contained in:
AidarKC
2026-04-21 01:04:05 +03:00
parent 2d48ae7a16
commit 185ba5b1d3
12 changed files with 186 additions and 34 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
export function renderHeader({ title, leftAction, rightActions = [] }) {
export function renderHeader({ title, leftAction, leftLabel = '', rightActions = [] }) {
const wrap = document.createElement('header');
wrap.className = 'page-header';
@@ -11,6 +11,12 @@ export function renderHeader({ title, leftAction, rightActions = [] }) {
btn.addEventListener('click', leftAction.onClick);
left.append(btn);
}
if (leftLabel) {
const label = document.createElement('span');
label.className = 'header-left-label';
label.textContent = leftLabel;
left.append(label);
}
const h1 = document.createElement('h1');
h1.className = 'page-title';