react-chrono icon indicating copy to clipboard operation
react-chrono copied to clipboard

Can't align timelineContent

Open brmbi opened this issue 3 years ago • 3 comments

Describe the bug Div wraps my custom component and has align-items: center. It has one more div inside, and then my component. I can't set up full width unless I hardcode width value..

To Reproduce Steps to reproduce the behavior:

  1. Create Chrono component
  2. For items return array of object only containing {timelineContent: }

Expected behavior I would expect to be able to modify these simple things.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 11 Pro
  • Browser Chrome
  • Version 117.0.5938.134

brmbi avatar Oct 17 '23 10:10 brmbi

@brmbi can you share the complete code that you are using to setup the timeline

prabhuignoto avatar Oct 18 '23 05:10 prabhuignoto

I have this exact same problem! Here is my code @prabhuignoto:

        title: "November 2023",
        cardTitle: "Test Test",
        cardSubtitle: "Stable Release",
        timelineContent: 
        <div className="justify-start"> 
        <ul>
            <li>Test</li>
            <li>Test</li>
            <li>Test</li>
        </ul>
        </div>
    },

sasha-computer avatar Oct 24 '23 15:10 sasha-computer

You can resolve the issue by adding a class with:

.customContent {
  justify-content: flex-start !important;
  align-items: stretch !important;
} 

And assigning it to the cardText in Chrono component. So classNames in Chrono component will look like this:

<Chrono
   ... rest of properties,
   classNames={{
                  cardText: styles.customContent,
                }}
 />

brmbi avatar Oct 26 '23 07:10 brmbi