Correction Ledger
Хронология правок материала: что изменено, когда и почему, с пословным сравнением. Pro · Контент и соцсети › Факты и источники
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add correction-ledger
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { CorrectionLedger } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
entries * | CorrectionEntry[] | Every change after publication. | |
published | DateInput | When the piece was first published: the start of the ledger. | |
order | 'newest' | 'oldest' | 'newest' | Reading order. Default newest. |
expanded | string[] | Ids of entries whose change is shown. | |
defaultExpanded | string[] | Initial open entries when uncontrolled. Default: major changes. | |
onExpandedChange | (expanded: string[]) => void | Called when the reader opens or closes an entry's change. | |
loading | boolean | false | The history is loading: skeleton. |
error | ReactNode | Loading failed: shown instead of the ledger. | |
title | ReactNode | Heading. Default: labels.title. | |
headingLevel | 2 | 3 | 4 | 5 | 3 | Level of the heading (default 3). |
timeZone | string | IANA time zone of the times (default: the ThemeProvider's, then the reader's). | |
locale | string | BCP 47 locale for dates; defaults to the ThemeProvider's. | |
labels | Partial<Omit<CorrectionLedgerLabels, 'kinds'>> & { kinds?: Partial<Record<CorrectionKind, string>> } | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Citation Evidence Lens — Подсветка утверждений по степени подтверждения и источники к каждому
- Source Dossier — Досье источников: статус проверки, факты со ссылками, виды источников, печать
- Interactive Quote Deck — Цитаты с первоисточником, контекстом, оригиналом перевода и шарингом с атрибуцией
- Article Header — Шапка статьи: рубрика, заголовок, лид, авторы и дата
- Byline — Подпись: авторы, дата публикации и обновления, время чтения
- Article Figure — Иллюстрация с подписью и автором фото
- Pull Quote — Выносная цитата с атрибуцией
- Key Points — Блок «Главное» с ключевыми тезисами
- Editor Note — Обновление, исправление, раскрытие и пометка о спонсорстве
- Article Toc — Оглавление статьи с подсветкой текущего раздела
- Reading Progress — Полоса прогресса чтения
- Share Bar — Поделиться: Telegram, VK, X, WhatsApp, почта и копирование ссылки
Назад: Source Dossier · Далее: Interactive Quote Deck · Весь раздел «Контент и соцсети»