mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-22 01:31:40 +08:00
feat: add beta tag for service map and light mode (#5674)
* feat: add beta tag for service map and light mode * chore: update test case
This commit is contained in:
parent
f3d73f6d44
commit
0dca1237b9
@ -27,7 +27,7 @@ jest.mock('hooks/useNotifications', () => ({
|
||||
|
||||
enum ThemeOptions {
|
||||
Dark = 'Dark',
|
||||
Light = 'Light',
|
||||
Light = 'Light Beta',
|
||||
}
|
||||
|
||||
describe('MySettings Flows', () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import './MySettings.styles.scss';
|
||||
|
||||
import { Button, Radio, RadioChangeEvent, Space, Typography } from 'antd';
|
||||
import { Button, Radio, RadioChangeEvent, Space, Tag, Typography } from 'antd';
|
||||
import { Logout } from 'api/utils';
|
||||
import useThemeMode, { useIsDarkMode } from 'hooks/useDarkMode';
|
||||
import { LogOut, Moon, Sun } from 'lucide-react';
|
||||
@ -26,6 +26,7 @@ function MySettings(): JSX.Element {
|
||||
label: (
|
||||
<div className="theme-option">
|
||||
<Sun size={12} data-testid="light-theme-icon" /> Light{' '}
|
||||
<Tag color="magenta">Beta</Tag>
|
||||
</div>
|
||||
),
|
||||
value: 'light',
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
||||
import './NavItem.styles.scss';
|
||||
|
||||
import { Tag } from 'antd';
|
||||
import cx from 'classnames';
|
||||
|
||||
import { SidebarItem } from '../sideNav.types';
|
||||
@ -15,7 +16,7 @@ export default function NavItem({
|
||||
isActive: boolean;
|
||||
onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||
}): JSX.Element {
|
||||
const { label, icon } = item;
|
||||
const { label, icon, isBeta } = item;
|
||||
|
||||
return (
|
||||
<div
|
||||
@ -27,6 +28,12 @@ export default function NavItem({
|
||||
<div className="nav-item-icon">{icon}</div>
|
||||
|
||||
<div className="nav-item-label">{label}</div>
|
||||
|
||||
{isBeta && (
|
||||
<div className="nav-item-beta">
|
||||
<Tag color="magenta">Beta</Tag>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -105,6 +105,7 @@ const menuItems: SidebarItem[] = [
|
||||
key: ROUTES.SERVICE_MAP,
|
||||
label: 'Service Map',
|
||||
icon: <Route size={16} />,
|
||||
isBeta: true,
|
||||
},
|
||||
{
|
||||
key: ROUTES.USAGE_EXPLORER,
|
||||
|
@ -12,6 +12,7 @@ export interface SidebarItem {
|
||||
text?: ReactNode;
|
||||
key: string | number;
|
||||
label?: ReactNode;
|
||||
isBeta?: boolean;
|
||||
}
|
||||
|
||||
export enum SecondaryMenuItemKey {
|
||||
|
Loading…
x
Reference in New Issue
Block a user