Files
blitzkit/packages/website-ue/src/components/ApiMacroSee.astro
T

21 lines
440 B
Plaintext
Raw Normal View History

2026-03-19 13:26:34 -05:00
---
import { Link } from "./Link";
import { Text } from "./Text";
interface Props {
value: string;
}
const bodyPattern = /^([a-z0-9-\/\.]+) (.+)$/;
const { value } = Astro.props;
const match = value.match(bodyPattern);
if (match === null) {
throw new Error(`Invalid value for ApiMacroSee: ${value}`);
}
const path = match[1];
const message = match[2];
---
<Text><Text color="tomato">See</Text> <Link>{path}</Link> {message}</Text>