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

Timeline.Body should use <div> instead of <p> #602

Closed
multiwebinc opened this issue Feb 16, 2023 · 0 comments · Fixed by #603
Closed

Timeline.Body should use <div> instead of <p> #602

multiwebinc opened this issue Feb 16, 2023 · 0 comments · Fixed by #603

Comments

@multiwebinc
Copy link
Contributor

Describe the bug
Since <div> cannot be a child of <p>, using a <div> as a child of Timeline.Body produces the following error:

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.

There is no reason for children of Timeline.Body to be limited to valid children of <p> tags.

To Reproduce

  <Timeline>
    <Timeline.Item>
      <Timeline.Point />
      <Timeline.Content>
        <Timeline.Title>Title</Timeline.Title>
        <Timeline.Body><div>test</div></Timeline.Body>
      </Timeline.Content>
    </Timeline.Item>
  </Timeline>

Project information:

  • Tailwind: 3.2.6
  • Flowbite: 1.6.3
  • Flowbite React: 0.3.8
  • Type: Nextjs
multiwebinc added a commit to multiwebinc/flowbite-react that referenced this issue Feb 16, 2023
tulup-conner added a commit that referenced this issue Feb 21, 2023
…#603)

This component previously defaulted to `<p>` which is needlessly opinionated.

Fixes #602

Co-authored-by: Conner Davis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant