components/authorship/examples.tsx
28 lines and 1 functions in DrDustinEdwards/capsomer, at commit d3966cc on 2026-10-24. This file on GitHub.
Functions
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| Sample | 6 to 22 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: mutation testing has not run on this repo yet |
Imports
It imports components/authorship/authorship.react.tsx. No module of this repo imports it.
Source
// Mounts the React specimen: Authorship and Run, whose summary counts the words under each Run.
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { Authorship, Run } from "./authorship.react.tsx";
function Sample() {
return (
<Authorship remember={false}>
<Run kind="you" block>
<p>The mention queue came first. I wrote the first version in one evening.</p>
</Run>
<p>
<Run kind="you">I asked the agent for a tidier name, </Run>
<Run kind="ai">and it suggested the queue be called the inbox. </Run>
<Run kind="you">I kept queue.</Run>
</p>
<Run kind="quoted" block>
<p>Every mention is untrusted until a person has looked at it.</p>
</Run>
</Authorship>
);
}
for (const el of document.querySelectorAll<HTMLElement>("[data-mount='react']")) {
createRoot(el).render(
<StrictMode>
<Sample />
</StrictMode>,
);
}