Skip to content

feat: add typed leading and trailing slots to List.Item - #5042

Draft
adam-sajko wants to merge 11 commits into
callstack:mainfrom
adam-sajko:feat/list-typed-slots
Draft

feat: add typed leading and trailing slots to List.Item#5042
adam-sajko wants to merge 11 commits into
callstack:mainfrom
adam-sajko:feat/list-typed-slots

Conversation

@adam-sajko

@adam-sajko adam-sajko commented Aug 7, 2026

Copy link
Copy Markdown

Motivation

#4930 wants explicit slots instead of layout tied to render props. Right now left and right hand the caller a style object and a color and trust them to apply both, so List.Item does not really own its own layout.

leading and trailing take a node and win over left and right when both are passed. List.Item wraps the node itself and puts the color on a small context, so List.Icon picks it up without the caller doing anything. That is the new ListItemContext and the one line in ListIcon.

Related issue

Related to #4930 and #4976

Draft, stacked on #5041 and #5057. Only the typed slots commit is this PR's change, the rest is the stack until those merge so github will show those commits until they land.

Test plan

Unit tests for the new slots side by side with the old left and right, both paths should still work.

@adam-sajko
adam-sajko force-pushed the feat/list-typed-slots branch from e155220 to c692ed1 Compare September 3, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants