-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
昔梦
committed
Dec 24, 2024
1 parent
48397ba
commit 120fc79
Showing
3 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/x-flow/src/components/NodeContainer/TitleMenuTooltip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, { useMemo } from 'react'; | ||
import createIconFont from '../../utils/createIconFont'; | ||
|
||
const TitleMenuTooltip = ({ icon, title, description, iconFontUrl, iconSvg }: any) => { | ||
const IconBox = useMemo(() => createIconFont(iconFontUrl), [iconFontUrl]); | ||
|
||
return ( | ||
<div className='xflow-node-title-menu-tooltip'> | ||
<div className='header-wrap'> | ||
<div className='icon-box-max' style={{ background: icon?.bgColor || '#F79009', marginRight: '8px' }}> | ||
{iconSvg ? iconSvg :<IconBox type={icon?.type} style={{ color: '#fff', fontSize: 13, ...icon?.style }} />} | ||
</div> | ||
<div className='title'> | ||
{title} | ||
</div> | ||
</div> | ||
<div className='description'> | ||
{description} | ||
</div> | ||
</div> | ||
) | ||
}; | ||
|
||
export default TitleMenuTooltip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters