Skip to content

Commit

Permalink
feat[#542]: add tooltip on snippet wrapper card
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiozeppo committed Sep 25, 2024
1 parent 5f57155 commit bfce1ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion frontend/src/pages/profile/SnippetCardWrapper.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
function SnippetCardWrapper({ children }) {
return <div className="snippet-card-wrapper">{children}</div>;
const hoverTooltip =
children.props.children.length > 1
? children.props.children[0].props.data?.name
: '';
return (
<div className="snippet-card-wrapper" title={hoverTooltip}>
{children}
</div>
);
}

export default SnippetCardWrapper;

0 comments on commit bfce1ed

Please sign in to comment.