creativetimofficial / material-tailwind

@material-tailwind is an easy-to-use components library for Tailwind CSS and Material Design.
https://material-tailwind.com/
MIT License
3.74k stars 320 forks source link

Timeline Connector not always rendering #683

Closed willfolsom closed 4 months ago

willfolsom commented 4 months ago

Hi there, I'm having an issue with the <TimelineConnector /> not always rendering. Any tips?

willfolsom commented 4 months ago

If anyone runs across this, dug through the source and amalgamated a custom span, i.e.

const TimelineConnector = () => {
  return (
    <div
      style={{
        position: "absolute",
        left: "4px",
        top: "16px",
        display: "grid",
        justifyContent: "justify-center",
        backgroundColor: "bg-transparent",
        transition: "transition-opacity duration-200",
      }}
    >
      <span style={{ width: "2px", opacity: 1, height: "24px", backgroundColor: "#C5C5C5" }}></span>
    </div>
  )
}

You can take it one step further by using dynamically calced variables for height, width, opacity, backgroundColor, really just about anything.