Skip to content

Commit

Permalink
added custom icons to the tooltip component
Browse files Browse the repository at this point in the history
  • Loading branch information
markgol777 committed Nov 28, 2024
1 parent c78c9b5 commit e288a8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/design-system/components/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ type TooltipProps = {
title: string
description?: string
position: 'up' | 'down' | 'right' | 'left' | 'none'
icon?: React.ReactNode
}

const ToolTip: React.FC<TooltipProps> = ({
variant,
title,
description,
position
position,
icon
}) => {
const textContent = (
<Box className='s2s-tooltip-text-container'>
Expand All @@ -24,7 +26,9 @@ const ToolTip: React.FC<TooltipProps> = ({
</Box>
)

const iconContent = <DoneIcon className='s2s-tooltip-icon' />
const iconContent = (
<Box className='s2s-tooltip-icon'>{icon || <DoneIcon />}</Box>
)

return (
<Box
Expand Down

0 comments on commit e288a8f

Please sign in to comment.