plugins.SideBar.Menu.NavItems.Links.LinkBody.tsx Maven / Gradle / Ivy
The newest version!
import React from 'react'
import classNames from 'classnames'
import { NavItemImage } from '@i-novus/n2o-components/lib/display/NavItemImage'
import { Badge } from '../../../../../components/snippets/Badge/Badge'
import { Item } from '../../../../CommonMenuTypes'
import { Icon, Title, getCurrentTitle, needRender } from '../../../utils'
export interface ItemContent extends Item {
sidebarOpen: boolean
isStaticView: boolean
showContent: boolean
isMiniView: boolean
}
export function LinkBody({ icon, title, src, sidebarOpen, imageSrc, imageShape, badge, isStaticView, showContent, isMiniView }: ItemContent) {
const currentTitle = getCurrentTitle(isMiniView, icon, title, imageSrc)
return (
<>
{needRender(currentTitle) && (
)}
>
)
}