Skip to content

Commit b348abf

Browse files
committed
Clarify chart catalog preview links
1 parent b834203 commit b348abf

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/components/charts/ChartsCatalogPages.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { ArrowsOutSimpleIcon, GridFourIcon } from '@phosphor-icons/react'
1+
import {
2+
ArrowsOutSimpleIcon,
3+
ArrowUpRightIcon,
4+
GridFourIcon,
5+
} from '@phosphor-icons/react'
26
import { ClientOnly, Link } from '@tanstack/react-router'
37
import * as React from 'react'
48
import type { ChartsCatalogIndexCase } from '~/utils/charts-catalog-index'
@@ -112,11 +116,17 @@ export function ChartsCatalog({
112116
key={catalogCase.id}
113117
className="group relative min-w-0 overflow-hidden rounded-xl border border-border-subtle bg-background-surface"
114118
>
115-
<div aria-hidden="true" className="aspect-[3/2]">
119+
<div aria-hidden="true" className="relative aspect-[3/2]">
116120
<ChartsCatalogPreview
117121
caseId={catalogCase.id}
118122
revision={revision}
119123
/>
124+
<div className="pointer-events-none absolute inset-0 flex items-center justify-center bg-background-default/60 opacity-0 backdrop-blur-[1px] transition-opacity duration-150 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">
125+
<span className="inline-flex items-center gap-1.5 rounded-lg border border-border-default bg-background-surface/95 px-3 py-2 font-ds-display text-sm font-semibold text-text-primary shadow-sm">
126+
Open example
127+
<ArrowUpRightIcon aria-hidden="true" className="size-4" />
128+
</span>
129+
</div>
120130
</div>
121131
<div className="flex min-h-16 items-center justify-between gap-4 border-t border-border-subtle px-4 py-3">
122132
<p className="min-w-0 truncate font-ds-display text-sm font-semibold text-text-primary">

0 commit comments

Comments
 (0)