diff --git a/.changeset/wicked-dancers-end.md b/.changeset/wicked-dancers-end.md
new file mode 100644
index 00000000000..1efa6fe3c9b
--- /dev/null
+++ b/.changeset/wicked-dancers-end.md
@@ -0,0 +1,18 @@
+---
+'braid-design-system': minor
+---
+
+---
+updated:
+ - MenuRenderer
+---
+
+**MenuRenderer:** Add `small` size.
+
+Introduce a new `small` size for the `MenuRenderer` component.
+This is available via the `size` prop, which supports the existing `standard` (default) and `small`.
+
+**EXAMPLE USAGE:**
+```jsx
+
+```
diff --git a/packages/braid-design-system/src/lib/components/MenuItem/MenuItem.screenshots.tsx b/packages/braid-design-system/src/lib/components/MenuItem/MenuItem.screenshots.tsx
index 467f40407e1..c1bafd4f1de 100644
--- a/packages/braid-design-system/src/lib/components/MenuItem/MenuItem.screenshots.tsx
+++ b/packages/braid-design-system/src/lib/components/MenuItem/MenuItem.screenshots.tsx
@@ -14,6 +14,7 @@ import { Menu } from '../MenuRenderer/MenuRenderer';
const defaultProps = {
offsetSpace: 'none',
align: 'left',
+ size: 'standard',
width: 'content',
highlightIndex: -1,
open: true,
diff --git a/packages/braid-design-system/src/lib/components/MenuItem/useMenuItem.tsx b/packages/braid-design-system/src/lib/components/MenuItem/useMenuItem.tsx
index 3bfb8e1ae77..320c6309fc2 100644
--- a/packages/braid-design-system/src/lib/components/MenuItem/useMenuItem.tsx
+++ b/packages/braid-design-system/src/lib/components/MenuItem/useMenuItem.tsx
@@ -11,7 +11,6 @@ import React, {
import type { BadgeProps } from '../Badge/Badge';
import { type BoxProps, Box } from '../Box/Box';
import { Text } from '../Text/Text';
-import { touchableText } from '../../css/typography.css';
import { normalizeKey } from '../private/normalizeKey';
import { MenuRendererItemContext } from '../MenuRenderer/MenuRendererItemContext';
import { type Action, actionTypes } from '../MenuRenderer/MenuRenderer.actions';
@@ -25,6 +24,7 @@ import { MenuRendererContext } from '../MenuRenderer/MenuRendererContext';
import { useBraidTheme } from '../BraidProvider/BraidThemeContext';
import { iconSlotSpace } from '../private/iconSlotSpace';
import { badgeSlotSpace } from '../private/badgeSlotSpace';
+import { virtualTouchable } from '../private/touchable/virtualTouchable.css';
const {
MENU_ITEM_UP,
@@ -37,8 +37,6 @@ const {
MENU_ITEM_HOVER,
} = actionTypes;
-const menuItemChildrenSize = 'standard';
-
type MenuItemTone = 'critical' | undefined;
export interface UseMenuItemProps {
@@ -58,10 +56,11 @@ export function useMenuItem({
id,
...restProps
}: UseMenuItemProps) {
+ const menuRendererContext = useContext(MenuRendererContext);
const menuRendererItemContext = useContext(MenuRendererItemContext);
assert(
- menuRendererItemContext !== null,
+ menuRendererContext !== null && menuRendererItemContext !== null,
`${displayName} must be rendered as an immediate child of a menu. See the documentation for correct usage: https://seek-oss.github.io/braid-design-system/components/MenuItem`,
);
@@ -69,6 +68,7 @@ export function useMenuItem({
throw new Error(`${displayName} element rendered outside menu context`);
}
+ const { size } = menuRendererContext;
const { isHighlighted, index, dispatch, focusTrigger } =
menuRendererItemContext;
const menuItemRef = useRef(null);
@@ -155,11 +155,14 @@ export function useMenuItem({
background: isHighlighted ? hoverBackground : undefined,
className: [
styles.menuItem,
- touchableText[menuItemChildrenSize],
+ size === 'small' ? virtualTouchable : undefined,
atoms({
- display: 'block',
+ display: 'flex',
+ alignItems: 'center',
width: 'full',
- paddingX: 'small',
+ paddingX: size === 'standard' ? 'small' : 'small', // todo - with 'small' size - small or xsmall?
+ paddingY: size === 'standard' ? undefined : 'xsmall',
+ height: size === 'standard' ? 'touchable' : undefined,
cursor: 'pointer',
textAlign: 'left',
outline: 'none',
@@ -200,25 +203,18 @@ function MenuItemChildren({
`MenuItem badge prop can only be an instance of Badge. e.g.