nandorojo / zeego

Menus for React (Native) done right.
https://zeego.dev
MIT License
1.42k stars 41 forks source link

Arrow component cannot be customized, due to missing props from Radix Arrow #67

Closed nderscore closed 7 months ago

nderscore commented 7 months ago

I could be missing something, but I don't think it's currently possible to colorize or customize the Arrow of Zeego's menus on web.


Looking at the Radix implementation, it seems that in order to colorize the Arrow component of Radix's Dropdown and Context Menus, it's necessary to pass an <svg> fill attribute as a prop to the <DropdownMenu.Arrow> / <ContextMenu.Arrow> component.

Or if the consumer does not want to use the default SVG implementation of the arrow, there is a prop asChild which renders the child instead.

Neither of these props gets exposed by Zeego's wrappers around the Radix arrow:

https://github.com/nandorojo/zeego/blob/master/packages/zeego/src/dropdown-menu/dropdown-menu.web.tsx#L233

https://github.com/nandorojo/zeego/blob/master/packages/zeego/src/context-menu/context-menu.web.tsx#L227


Zeego's Arrow components should probably expose SVG attributes and asChild as props

nandorojo commented 7 months ago

Open to a PR