Фронтенд для сервиса (#5)
Tests / test (push) Successful in 2m26s

Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz>
Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/5
This commit was merged in pull request #5.
This commit is contained in:
2026-07-30 06:11:24 +00:00
parent 5476c1bab5
commit da158cfd84
114 changed files with 26045 additions and 2 deletions
@@ -0,0 +1,27 @@
import * as React from 'react';
import styles from './PageChrome.module.scss';
export interface IBreadcrumbItem {
label: string;
/** Без onClick пункт неинтерактивен — это текущая страница. */
onClick?: () => void;
}
export interface IBreadcrumbsProps {
items: IBreadcrumbItem[];
}
export const Breadcrumbs: React.FC<IBreadcrumbsProps> = ({ items }) => (
<div className={styles.bread}>
{items.map((item, index) => (
<React.Fragment key={item.label}>
{index > 0 && <span className={styles.sep}>&#9670;</span>}
{item.onClick ? (
<button className={styles.breadLink} onClick={item.onClick}>{item.label}</button>
) : (
<span>{item.label}</span>
)}
</React.Fragment>
))}
</div>
);