Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfoListItem should disable typography wrappers #644

Closed
joebochill opened this issue Nov 23, 2022 · 1 comment · Fixed by #665
Closed

InfoListItem should disable typography wrappers #644

joebochill opened this issue Nov 23, 2022 · 1 comment · Fixed by #665
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected
Milestone

Comments

@joebochill
Copy link
Collaborator

Describe the bug

InfoListItem throws invalid DOM nesting errors because we are using custom components inside the ListItemText

What is the expected behavior?

There should be no DOM Validation warnings

What are the steps to reproduce?

  1. Pass custom elements to the title/subtitle/info props for InfoListItem
  2. Observe the errors in the console

Screenshots / Screen recording

image

Code snippet / Link to minimum reproduction example

<InfoListItem
    title={
        <Box>
            <Typography noWrap>
                {title}
            </Typography>
        </Box>
    }
    subtitle={description}
/>

Your environment information

N/A

Suggested fix

https://github.com/brightlayer-ui/react-component-library/blob/dev/components/src/core/InfoListItem/InfoListItem.tsx#L254
Add the disableTypography prop to the ListItemText

Anything else to add?

@joebochill joebochill added bug Something not working as expected needs-review Issues that we would like to revisit/review labels Nov 23, 2022
@daileytj daileytj added this to the 6.3.0 milestone Dec 1, 2022
@joebochill joebochill modified the milestones: 6.3.0, 6.2.0 Dec 1, 2022
@jeffvg jeffvg removed the needs-review Issues that we would like to revisit/review label Dec 8, 2022
@bkarambe
Copy link
Contributor

Adding disableTypography props will not allow to pass primaryTypographyProps or secondaryTypographyProps, which will affect the styles of title, subtitle and info.

@joebochill joebochill added the brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering label Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected
Development

Successfully merging a pull request may close this issue.

4 participants