fix: links

Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
This commit is contained in:
Filipe Medeiros 2023-04-11 16:05:38 +01:00
parent fbf6089cbc
commit d84fd7d6c1
Signed by: filipe
GPG key ID: 9533BD5467CC1E78
2 changed files with 7 additions and 4 deletions

View file

@ -34,7 +34,7 @@ const components = {
h6: Heading6,
normal: Paragraph,
},
marks: {
mark: {
code: InlineCode,
link: InlineLink,
},

View file

@ -2,12 +2,15 @@
import type { PortableTextLink } from '@portabletext/types';
export interface Props {
value?: PortableTextLink;
node: { markDef: PortableTextLink };
}
const { value } = Astro.props;
const { node: value } = Astro.props;
---
<a class="text-primary-800 underline hover:text-primary-700" href={value?.href}>
<a
class="text-primary-800 break-words underline hover:text-primary-700"
href={value.markDef.href}
>
<slot />
</a>