plugins.Header.SimpleHeader.Menu.NavItems.Links.LinkBody.tsx Maven / Gradle / Ivy
The newest version!
import React from 'react'
import classNames from 'classnames'
import { BadgeProps } from 'reactstrap'
import { Badge } from '@i-novus/n2o-components/lib/display/Badge/Badge'
import { NavItemImage } from '@i-novus/n2o-components/lib/display/NavItemImage'
import { IconContainer, ICON_POSITIONS } from '../../../../../../components/snippets/IconContainer/IconContainer'
import { needRender } from '../../../../../SideBar/utils'
interface LinkBodyProps {
imageSrc?: string
icon?: string
title?: string
imageShape?: string
badge?: BadgeProps
iconPosition?: ICON_POSITIONS
}
export function LinkBody({ imageSrc, icon, title, imageShape, badge, iconPosition = ICON_POSITIONS.LEFT }: LinkBodyProps) {
return (
<>
{!imageSrc && icon && }
{needRender(title) && title}
>
)
}