bito-code-review[bot] commented on PR #42147:
URL: https://github.com/apache/superset/pull/42147#issuecomment-5007730927
<!-- Bito Reply -->
The flagged issue is correct. Using a truthy check on `children` causes
numeric `0` values to be treated as falsy, which prevents the
`margin-inline-end` style from being applied. This results in the icon sitting
flush against the `0` text.
To resolve this, you should check if `children` is not null or undefined.
Here is the corrected implementation for the Emotion styles:
```tsx
css={css`
display: inline-flex;
align-items: center;
${children !== null && children !== undefined ? `margin-inline-end:
${theme.paddingXS}px;` : ''}
`}
```
Regarding other comments on this PR: the current review discussion appears
to be empty, so there are no additional comments to address at this time.
**superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx**
```
css={css`
display: inline-flex;
align-items: center;
${children !== null && children !== undefined ? `margin-inline-end:
${theme.paddingXS}px;` : ''}
`}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]