Files
progcode/docs/design-system/kit-completeness/reference-source/fsd/widgets/article-reader/index.jsx
T
huncode 12562baeb5
Build and deploy / deploy (push) Successful in 2m39s
Implement ProgCode identity and real shared reading UI kit
2026-10-27 15:19:49 +03:00

4 lines
748 B
React
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import {Prose} from '../../shared/ui';
import {ContentAccess} from '../../features/content-access';
export default function ArticleReader({article,related}){return <div className="reading-layout">{article.toc?.length>1&&<aside className="contents-rail"><details open><summary>В этой статье</summary><nav aria-label="Оглавление статьи">{article.toc.map((section,index)=><a key={section.id} href={'#'+section.id}><span>{String(index+1).padStart(2,'0')}</span>{section.title}</a>)}</nav></details></aside>}<div className="reading-column"><Prose html={article.contentHtml}/><ContentAccess/><div className="article-end"><span>КОНЕЦ ЗАМЕТКИ</span><a href="#main">↑ В начало</a></div>{related}</div></div>}