Pass Through Props: Syntactic improvement suggestion #4125
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the feature you would like to see added
The PT feature is a great tool for styling components and the new Unstyled Mode is a reasonable addition to that. But the required syntax for using PT is a bit cumbersome. Most of the time you want to add style classes using the
class
prop/attribute with a fixed string value.Here is an example from the Unstyled Mode documentation:
The point is, you have to repeat the
{ class: '...' }
all the time.I would suggest the simplification that if you only want to specify the class prop, you can omit the object syntax and directly use the string values. So the above example can be rewritten as:
Is your feature request related to a problem?
No response
Describe the solution you'd like
No response
Describe alternatives you have considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: