Добавил сайт с UI прямо сюда
This commit is contained in:
AidarKC
2026-03-30 00:43:49 +03:00
parent 889ce0d921
commit b33fa4aeaa
44 changed files with 5366 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
export function renderHeader({ title, leftAction, rightActions = [] }) {
const wrap = document.createElement('header');
wrap.className = 'page-header';
const left = document.createElement('div');
left.className = 'header-left';
if (leftAction) {
const btn = document.createElement('button');
btn.className = 'icon-btn';
btn.textContent = leftAction.label;
btn.addEventListener('click', leftAction.onClick);
left.append(btn);
}
const h1 = document.createElement('h1');
h1.className = 'page-title';
h1.textContent = title;
const right = document.createElement('div');
right.className = 'header-actions';
rightActions.forEach((action) => {
const btn = document.createElement('button');
btn.className = 'icon-btn';
btn.textContent = action.label;
btn.addEventListener('click', action.onClick);
right.append(btn);
});
wrap.append(left, h1, right);
return wrap;
}