Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(docsite): use Link trigger in HoverCard "Link Preview" example (#2728) (#3279)

mohitWeb-lab253276670da6
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs
index b0c2fea236..67ad3675f6 100644
--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs
@@ -10,5 +10,5 @@ export const doc = {
'Shows a page summary when hovering a link: title, description, and URL. Use for documentation links, article references, or any URL where a preview helps the user decide whether to click.',
isReady: true,
aspectRatio: 16 / 9,
- componentsUsed: ['HoverCard', 'Icon', 'Layout', 'Text'],
+ componentsUsed: ['HoverCard', 'Icon', 'Layout', 'Link', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx
index 172a12186b..484f45f727 100644
--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx
@@ -5,12 +5,14 @@
import {HoverCard} from '@astryxdesign/core/HoverCard';
import {Icon} from '@astryxdesign/core/Icon';
import {VStack, HStack} from '@astryxdesign/core/Layout';
+import {Link} from '@astryxdesign/core/Link';
import {Text} from '@astryxdesign/core/Text';
import {LinkIcon} from '@heroicons/react/24/outline';
export default function HoverCardInteractiveContent() {
return (
- <Text type="body">Read more in the{' '}
+ <Text type="body">
+ Read more in the{' '}
<HoverCard
placement="below"
content={
@@ -30,8 +32,11 @@ export default function HoverCardInteractiveContent() {
</HStack>
</VStack>
}>
- Getting Started Guide
- </HoverCard>.
- </Text>
+ <Link href="#" hasUnderline>
+ Getting Started Guide
+ </Link>
+ </HoverCard>
+ .
+ </Text>
);
}