From 9458cb9f2cfb52ffbe3b912da2861573a9b14a3c Mon Sep 17 00:00:00 2001 From: Doberjohn Date: Mon, 23 Nov 2026 14:46:37 +0200 Subject: [PATCH] docs(migration): explain IconButton's footprint when moving to iconSize In v5 an IconButton was its icon plus 8dp on each side, so a numeric size also set the button's size. In v6 the container follows the named size, so moving the number to iconSize can grow or shrink the button. Say so in the guide, and show a smaller button and one that takes the same space as before. Refs: #5103 --- docs/6.x/docs/guides/migration.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/6.x/docs/guides/migration.md b/docs/6.x/docs/guides/migration.md index 0b0b13c650..e8e5ec373a 100644 --- a/docs/6.x/docs/guides/migration.md +++ b/docs/6.x/docs/guides/migration.md @@ -1509,6 +1509,19 @@ To set the glyph size in dp without changing the container scale, use `iconSize` ``` +The container no longer follows the icon. In v5 it was the icon plus 8dp on each side, so `size={20}` drew a 36dp button and `size={32}` a 48dp one. Moving the number to `iconSize` keeps the glyph but puts it in the container of the named `size`, 40dp for the default, so a button you migrate this way can grow or shrink. Check rows and headers that depend on its width. For a smaller button, use `size="extra-small"` (32dp with a 20dp icon). To take the same space as before, lower the 6dp margin around the button. + +```tsx +// Before (v5): a 36dp button, 48dp with its margin + + +// After (v6): a 32dp button, 44dp with its margin + + +// After (v6): a 40dp button, 48dp with a 4dp margin + +``` + ```tsx // After (v6): named container sizes