Skip to content

Commit

Permalink
fix: make ping clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
christianmat committed Sep 12, 2024
1 parent 53e8b42 commit 9bb79e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/react/src/components/Hint/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export function Hint({
{...referenceProps}
position="absolute"
style={getPingPosition({ align: finalAlign, side: finalSide })}
clickable={defaultOpen === false}
/>
</Box>
</>
Expand Down
8 changes: 6 additions & 2 deletions packages/react/src/components/Ping/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ const pulse = keyframes({
},
})

export interface PingProps extends BoxProps {}
export interface PingProps extends BoxProps {
clickable?: boolean
}

export function Ping({ part = '', ...props }: PingProps) {
export function Ping({ clickable = false, part = '', ...props }: PingProps) {
return (
<Box
borderRadius="24px"
height="24px"
part={`ping-wrapper ${part}`}
position="relative"
width="24px"
cursor={clickable ? 'pointer' : undefined}
{...props}
>
<Box
Expand All @@ -51,6 +54,7 @@ export function Ping({ part = '', ...props }: PingProps) {
position="absolute"
top="0"
width="24px"
backgroundColor:hover={clickable ? 'primary.hover.surface' : undefined}
/>
</Box>
)
Expand Down

0 comments on commit 9bb79e0

Please sign in to comment.