michael-s-molina edited a comment on pull request #12122:
URL: 
https://github.com/apache/incubator-superset/pull/12122#issuecomment-749508388


   @rusackas Those were great observations. For me these specific properties 
(margins) are related to positioning of the component in a screen so they are 
not generic but layout based. With that in mind, Alert already have properties 
for this scenario: `style` and `className`. What `styled` is actually doing is 
passing a `className` for the Alert component but in a non direct manner so I 
thought of replacing that with the `css` property. 
   
   ```
   <Alert
        css={theme => ({
          marginTop: theme.gridUnit * 4,
          marginBottom: theme.gridUnit * 4,
        })}
        ...
   />
   ```
   
   This makes more clear the we are positioning the element and have the 
benefit of autocompletion and type checking.
   
   You were totally wright about the mismatching grid units. I changed all to 
4. 
   
   Let me know if you agree with that 😉 
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to