You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part names must be **statically known at compile time**. The Babel transform needs to generate the corresponding `*Style` props, so it must know all possible part names.
328
+
329
+
**Allowed:**
330
+
```jsx
331
+
part="root icon"// Static string
332
+
part={['content', { active }]} // Array with static strings and objects
333
+
part={{ content:true, active }} // Object with static keys
334
+
part={['item', { selected: isSelected }]} // Boolean expressions as values
335
+
```
336
+
337
+
**Not allowed:**
338
+
```jsx
339
+
part={variant} // Dynamic value — part names unknown
340
+
part={['card', variant]} // Dynamic string in array
341
+
part={{ [variant]:true }} // Computed/dynamic key
342
+
part={{ ...partConfig }} // Spread operator
343
+
```
344
+
345
+
If you need fully dynamic parts, pass style props directly instead of using the `part` system.
346
+
248
347
## Compound Selectors with Parts
249
348
250
349
Combine class selectors with parts for conditional styling:
0 commit comments