Closed yamadapc closed 6 months ago
Describe the bug
If a component is declared as
const Box = styled.div({ marginTop: ({ marginTop }) => marginTop, });
When used it ends-up having a --variable-for-margin-top: ... value set to the property value, assuming it is used like <Box marginTop={...} />.
--variable-for-margin-top: ...
<Box marginTop={...} />
When the property parameters object destructuring expression has a property default however, such as:
const Box = styled.div({ marginTop: ({ marginTop = 0 }) => marginTop, });
When used it ends-up having a --variable-for-margin-top: ... value set to the property value, but also having the margintop=... attribute set on the DOM element. This leads to react warnings on unexpected attribute values.
margintop=...
Describe the bug
If a component is declared as
When used it ends-up having a
--variable-for-margin-top: ...
value set to the property value, assuming it is used like<Box marginTop={...} />
.When the property parameters object destructuring expression has a property default however, such as:
When used it ends-up having a
--variable-for-margin-top: ...
value set to the property value, but also having themargintop=...
attribute set on the DOM element. This leads to react warnings on unexpected attribute values.