diff --git a/packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceMenuButton.tsx b/packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceMenuButton.tsx index 0f6694b6cb9..9a09c26ce3d 100644 --- a/packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceMenuButton.tsx +++ b/packages/sanity/src/core/studio/components/navbar/workspace/WorkspaceMenuButton.tsx @@ -1,4 +1,4 @@ -import {SelectIcon} from '@sanity/icons' +import {CheckmarkIcon, SelectIcon} from '@sanity/icons' import {Button, MenuButton, Menu, MenuButtonProps, Box, Label, Stack, Card} from '@sanity/ui' import React, {useCallback, useMemo, useState} from 'react' import styled from 'styled-components' @@ -101,6 +101,9 @@ export function WorkspaceMenuButton(props: WorkspaceMenuButtonProps) { onClick={handleSelectWorkspace} pressed={workspace.name === activeWorkspace.name} selected={workspace.name === activeWorkspace.name} + iconRight={ + workspace.name === activeWorkspace.name ? CheckmarkIcon : undefined + } badgeText={STATE_TITLES[state]} preview={} text={workspace?.title || workspace.name} diff --git a/packages/sanity/src/ui/menuItem/MenuItem.tsx b/packages/sanity/src/ui/menuItem/MenuItem.tsx index 18df0bfbdb3..4e63e13b7bd 100644 --- a/packages/sanity/src/ui/menuItem/MenuItem.tsx +++ b/packages/sanity/src/ui/menuItem/MenuItem.tsx @@ -122,6 +122,12 @@ export const MenuItem = forwardRef(function MenuItem( {badgeText} )} + {iconRight && ( + + {isValidElement(iconRight) && iconRight} + {isValidElementType(iconRight) && createElement(iconRight)} + + )} ) }