diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx index b4813f449f60..f8bad0510b02 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx @@ -84,6 +84,7 @@ type NewItem = { show: boolean; longDescription: ReactNode; preview?: ReactNode; + beta?: boolean; }; interface INewInUnleashProps { @@ -174,6 +175,7 @@ export const NewInUnleash = ({

), + beta: true, }, ]; @@ -218,6 +220,7 @@ export const NewInUnleash = ({ docsLink, preview, summary, + beta = false, }) => ( ), )} diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashItem.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashItem.tsx index cf79f1fb6420..ca16630328c4 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashItem.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashItem.tsx @@ -10,6 +10,8 @@ import { } from '@mui/material'; import Close from '@mui/icons-material/Close'; import { NewInUnleashTooltip } from './NewInUnleashTooltip'; +import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; +import { Badge } from 'component/common/Badge/Badge'; const StyledItemButton = styled(ListItemButton)(({ theme }) => ({ outline: `1px solid ${theme.palette.divider}`, @@ -26,6 +28,12 @@ const LabelWithSummary = styled('div')(({ theme }) => ({ flex: 1, })); +const StyledItemTitle = styled('div')(({ theme }) => ({ + display: 'flex', + gap: theme.spacing(1), + alignItems: 'center', +})); + const StyledItemButtonClose = styled(IconButton)(({ theme }) => ({ padding: theme.spacing(0.25), })); @@ -40,6 +48,7 @@ interface INewInUnleashItemProps { docsLink: string; preview?: ReactNode; summary: string; + beta: boolean; } const useTooltip = () => { @@ -66,6 +75,7 @@ export const NewInUnleashItem = ({ docsLink, preview, summary, + beta, }: INewInUnleashItemProps) => { const { open, handleTooltipOpen, handleTooltipClose } = useTooltip(); @@ -90,13 +100,20 @@ export const NewInUnleashItem = ({ onCheckItOut={onCheckItOut} docsLink={docsLink} preview={preview} + beta={beta} > {icon} - - {label} - + + Beta} + /> + + {label} + + {summary} diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashTooltip.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashTooltip.tsx index 761f994dfb18..ef203071ca31 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashTooltip.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashTooltip.tsx @@ -12,6 +12,8 @@ import { import type { Link as RouterLink } from 'react-router-dom'; import OpenInNew from '@mui/icons-material/OpenInNew'; import { ReactComponent as UnleashLogo } from 'assets/img/logoWithWhiteText.svg'; +import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; +import { Badge } from 'component/common/Badge/Badge'; const Header = styled(Box)(({ theme }) => ({ backgroundColor: theme.palette.primary.light, @@ -85,6 +87,7 @@ export const NewInUnleashTooltip: FC<{ open: boolean; preview?: ReactNode; onClose: () => void; + beta: boolean; }> = ({ children, title, @@ -94,6 +97,7 @@ export const NewInUnleashTooltip: FC<{ preview, open, onClose, + beta, }) => ( + Beta} + /> {title} {longDescription}