packages/codemods/v5-0-0/03-migrate-inline-style-props.md
style: { .* } Sub-SlotsSeveral blocks had dedicated style properties under properties: (like headerStyle, bodyStyle, maskStyle). These move to the unified style: block with .-prefixed slot keys.
For each block, find the old style property under properties: and move its value to the corresponding style: { .slot } entry. Remove the old property from properties:.
Full mapping table:
| Block | Old Property | New Location |
|---|---|---|
| Card | properties.headerStyle | style: { .header } |
| Card | properties.bodyStyle | style: { .body } |
| Modal | properties.bodyStyle | style: { .body } |
| Modal | properties.maskStyle | style: { .mask } |
| Drawer | properties.drawerStyle | style: { .wrapper } |
| Drawer | properties.headerStyle | style: { .header } |
| Drawer | properties.bodyStyle | style: { .body } |
| Drawer | properties.maskStyle | style: { .mask } |
| Drawer | properties.contentWrapperStyle | style: { .content } |
| Tabs | properties.tabBarStyle | style: { .tabBar } |
| ConfirmModal | properties.bodyStyle | style: { .body } |
| Statistic | properties.valueStyle | style: { .value } |
| Descriptions | properties.contentStyle | style: { .content } |
| Descriptions | properties.labelStyle | style: { .label } |
| Tooltip | properties.overlayStyle | style: { .inner } |
Glob: **/*.{yaml,yml}
Grep: headerStyle:|bodyStyle:|maskStyle:|drawerStyle:|contentWrapperStyle:|tabBarStyle:|valueStyle:|contentStyle:|labelStyle:|overlayStyle:
- id: my_card
type: Card
properties:
title: Details
headerStyle:
backgroundColor: '#fafafa'
bodyStyle:
padding: 24
- id: my_card
type: Card
properties:
title: Details
style:
.header:
backgroundColor: '#fafafa'
.body:
padding: 24
- id: settings_drawer
type: Drawer
properties:
title: Settings
drawerStyle:
backgroundColor: '#f5f5f5'
headerStyle:
borderBottom: '1px solid #e8e8e8'
bodyStyle:
padding: 16
- id: settings_drawer
type: Drawer
properties:
title: Settings
style:
.wrapper:
backgroundColor: '#f5f5f5'
.header:
borderBottom: '1px solid #e8e8e8'
.body:
padding: 16
style: block, merge the new .slot entries into itstyle: { .element } from prompt 02, add the new slots alongside itheaderStyle only appears on Card and Drawer, so block-type checking is optional but recommended for safetygrep -rn 'headerStyle:\|bodyStyle:\|maskStyle:\|drawerStyle:\|contentWrapperStyle:\|tabBarStyle:\|valueStyle:\|contentStyle:\|labelStyle:\|overlayStyle:' --include='*.yaml' --include='*.yml' .
No matches should remain after migration (except inside code blocks or string content).