fix: links
Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
This commit is contained in:
parent
fbf6089cbc
commit
d84fd7d6c1
|
@ -34,7 +34,7 @@ const components = {
|
|||
h6: Heading6,
|
||||
normal: Paragraph,
|
||||
},
|
||||
marks: {
|
||||
mark: {
|
||||
code: InlineCode,
|
||||
link: InlineLink,
|
||||
},
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue