Skip to content

refactor: align List tokens, spacing and typography with MD3 - #5041

Draft
adam-sajko wants to merge 1 commit into
callstack:mainfrom
adam-sajko:feat/list-md3-tokens-spacing
Draft

refactor: align List tokens, spacing and typography with MD3#5041
adam-sajko wants to merge 1 commit into
callstack:mainfrom
adam-sajko:feat/list-md3-tokens-spacing

Conversation

@adam-sajko

Copy link
Copy Markdown

Motivation

List.Item and List.Accordion hardcoded fontSize 16 and 14 and never passed a variant, so Text fell back to theme.fonts.default and the platform decided the line height. Item heights were not deterministic.

Vertical spacing was also split in two, paddingVertical: 8 on the container plus marginVertical: 6 on the row. That adds up to 14dp, which is right for a two line item and wrong for a one line one.

The title and description render props still get fontSize, now read from
theme.fonts. Same values as before, 16 and 14.

No API changes!

Related issue

Related to #4976

Test plan

Snapshots were updated on purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant