-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve nodes and marks TS types, update demo typings
Signed-off-by: Edvinas Jurele <edvinas.j@nordsec.com>
- Loading branch information
1 parent
f535e5b
commit 282a146
Showing
5 changed files
with
97 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
--- | ||
export type Props = { | ||
syntax: string; | ||
}; | ||
const { syntax } = Astro.props; | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
--- | ||
export type Props = { | ||
link: { | ||
href: string; | ||
target?: "_blank" | "_self"; | ||
}; | ||
}; | ||
import type { HTMLAttributes } from "astro/types"; | ||
import type { Link } from "storyblok-rich-text-astro-renderer"; | ||
const { link, ...props } = Astro.props; | ||
const { href, target } = link; | ||
export interface Props extends HTMLAttributes<"a"> { | ||
link: Link["attrs"]; | ||
} | ||
const { | ||
link: { href, target }, | ||
...props | ||
} = Astro.props; | ||
--- | ||
|
||
<a {href} {target} {...props}><slot /></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters