CommentAnchor
The highlighted words a comment thread hangs from.
SourcePackage @kerf-js/veneer
Preview
tsx
import { state } from '@kerf-js/core'import { CommentAnchor, Stack, Text} from '@kerf-js/veneer'export function CommentAnchorText() { const active = state<string | null>(null) return ( <Stack gap="related"> <Text> The cache keeps a page for{' '} <CommentAnchor thread="c-timeouts" active={active} > 60 seconds </CommentAnchor>{' '} after a deploy. </Text> <Text subtle> {active.value ? 'The thread is active.' : 'Press the highlighted words.'} </Text> </Stack> )}Installation
npm install @kerf-js/veneerUsage
tsx
import { CommentAnchor } from '@kerf-js/veneer'Accessibility
- Enter
- Opens its thread
- Space
- Opens its thread
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
thread | string | — | The thread's id. |
active | State<string | null> | — | The open thread, shared with the CommentRail. |
children | unknown | — | What it contains. |
RelatedComment railComment thread