@@ -17,6 +17,7 @@ import {atoms as a, flatten, flattenToCSS, useTheme, utils, web} from '#/alf'
1717import type * as Dialog from '#/components/Dialog'
1818import { useInteractionState } from '#/components/hooks/useInteractionState'
1919import { Check_Stroke3_Corner0_Rounded as Check } from '#/components/icons/Check'
20+ import { ChevronRight_Stroke2_Corner0_Rounded as ChevronRight } from '#/components/icons/Chevron'
2021import {
2122 Context ,
2223 ItemContext ,
@@ -357,14 +358,19 @@ export function Item({
357358/**
358359 * Puts an item's icons on the leading side, whatever order they're written
359360 * in, like Android's menus. A radio item leads with its check instead, and its
360- * icons trail.
361+ * icons trail. A right chevron means the item opens more options, so it
362+ * trails like Android's submenu arrow.
361363 */
362364function arrangeItemContent ( children : React . ReactNode ) {
363365 let radio : React . ReactElement < { selected : boolean } > | undefined
364366 const icons : React . ReactNode [ ] = [ ]
365367 const rest : React . ReactNode [ ] = [ ]
366368 for ( const child of flattenReactChildren ( children ) ) {
367- if ( isValidElement ( child ) && child . type === ItemIcon ) {
369+ if (
370+ isValidElement < ItemIconProps > ( child ) &&
371+ child . type === ItemIcon &&
372+ child . props . icon !== ChevronRight
373+ ) {
368374 icons . push ( child )
369375 } else if (
370376 isValidElement < { selected : boolean } > ( child ) &&
@@ -404,7 +410,8 @@ export function ItemText({children, style}: ItemTextProps) {
404410}
405411
406412/**
407- * `position` has no effect: icons always lead, or trail in radio items.
413+ * `position` has no effect: icons always lead, or trail in radio items. A
414+ * right chevron always trails.
408415 */
409416export function ItemIcon ( { icon : Comp , fill} : ItemIconProps ) {
410417 const t = useTheme ( )
0 commit comments