themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.82k stars 406 forks source link

TimelineContent is not taking theme styles when being in vertical mode #1196

Closed trocoli96 closed 1 month ago

trocoli96 commented 8 months ago

Steps to reproduce

  1. Use the Timeline.Content component and configuring the theme to change the styling
  2. The style is applied only when horizontal prop is "true"

Current behavior

Currently, the Timeline.Content component, when passing the styles from the theme, is not taking properly the styles because they are only applied in horizontal.

image

Example: This is an example of the same theme used on horizontal and in vertical

This is my theme object

image

Horizontal:

image

Vertical:

Captura de pantalla 2023-12-21 a las 17 09 45

As you can see, the border from the box is only applied when horizontal prop is true

Expected behavior

Both horizontal and vertical options apply the root base from content

Context

Right now, when using the Timeline component, you can add a child which is Timeline.Content which is basically the content inside each item, but this is only letting change the style when using it in horizontal.

victorfunes commented 8 months ago

Just to add information: we are using the to setup default theme for all our application and not setting the theme in the component itself.

tulup-conner commented 7 months ago

Thank you, that makes sense.

If anyone has time, we need to always include base theme in <Timeline> and add new props to the theme outside base called horizontal->on/off, or maybe just horizontal/vertical. Pull out the CSS from base that changes the orientation between the two.

SutuSebastian commented 1 month ago

Fixed in flowbite-react@0.10.0 release.