Skip to content

Commit

Permalink
[DSTSUP-75]: Fixing icons in our docs to be copied correctly (#3908)
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaAbdellateef committed May 13, 2024
1 parent 60b032a commit 20fb4f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-coats-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marigold/docs": patch
---

Fixing icons into docs to be copied in the right way
13 changes: 4 additions & 9 deletions docs/ui/IconList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,16 @@ const IconListItem = ({ icon }: IconListItemProps) => {
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
>
<div className="grid h-24 place-items-center">
<div className="relative grid h-24 place-items-center">
<div
className={cn(
isCopied || isHovered ? 'block' : 'hidden',
'select-none whitespace-nowrap font-medium tracking-wider'
isCopied || isHovered ? 'opacity-1' : 'opacity-0',
'bg-bg-surface absolute flex size-full select-none items-center justify-center whitespace-nowrap font-medium tracking-wider'
)}
>
{isCopied ? 'COPIED!' : 'COPY SVG'}
</div>
<Component
width={48}
height={48}
ref={svgRef as any}
className={cn(isHovered || isCopied ? 'hidden' : 'block')}
/>
<Component width={48} height={48} ref={svgRef as any} />
</div>
</Card>
<Text size="small" align="center">
Expand Down

0 comments on commit 20fb4f4

Please sign in to comment.