mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 04:36:12 +01:00
feat: zooweemama
This commit is contained in:
1 parent
841b5708ae
commit
824169fc25
7 files changed
+97
-26
No files matched your search
@@ -0,0 +1,21 @@
|
||||
---
|
||||
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>
|
||||
Reference in new issue
Block a user