aaron9000 / react-image-timeline

:calendar: An image-centric timeline component for React.js
http://aaron9000.github.io/react-image-timeline/
MIT License
86 stars 17 forks source link

Feature Request: optional button #19

Closed joepagan closed 4 years ago

joepagan commented 4 years ago

hey, thanks for your work on this, it would be good to make the button optional if not passed in the event object.

joepagan commented 4 years ago

I meant by just passing null to buttonText in the event object array:

  const events = [
  {
    date: new Date(2013, 9, 27),
    text: "Sed leo elit, pellentesque sit amet congue quis, ornare nec lorem.",
    title: "Cairo, Egypt",
    buttonText: null,
    imageUrl: "http://github.com/aaron9000/react-image-timeline/blob/master/src/assets/cairo.jpg?raw=true",
  },
];

Figured out I can do this with the custom components feature:

const CustomFooter = (props) => {
  return null;
};

with:

<Timeline events={events} customComponents={{footer: CustomFooter}} />