Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫
Something went wrong. Try again.
611 B · 24 lines
TSX
at build
12345678910111213141516171819202122232425import {splitFacetSyntax} from '#/lib/strings/rich-text-manip'import {utils} from '#/alf'import {Span} from '#/components/Typography'
/** Dim syntax that will be removed while keeping the editable text intact. */export function SyntaxText({ text, start, removalIndices, color,}: { text: string start: number removalIndices: ReadonlySet<number> color: string}) { return splitFacetSyntax(text, start, removalIndices).map((segment, index) => ( <Span key={index} style={segment.removed ? {color: utils.alpha(color, 0.5)} : undefined}> {segment.text} </Span> ))}