stephane-monnot / react-vertical-timeline

Vertical timeline for React.js
https://stephane-monnot.github.io/react-vertical-timeline/
MIT License
1.08k stars 158 forks source link

Custom icons #43

Closed AniOjha closed 4 years ago

AniOjha commented 4 years ago

How can I use my own images as icons of the timeline (eg. the logo of my institute)?

SBRKH commented 4 years ago

You have a props icon={} so you can pass your own icons.

stephane-monnot commented 4 years ago

Exactly, you can see an example here : https://github.com/stephane-monnot/react-vertical-timeline/blob/master/docs/index.js#L50

AniOjha commented 4 years ago

In the example haven't you used the standard WorkIcon from '@material-ui/icons/Work' ? In what format do I pass in my own images?

gihanrcg commented 4 years ago

I was also wondering How can we add our own .jpeg, .png icons.

BTW, awesome component

jtela commented 4 years ago

This is how I managed to do it : import myLogo from './my-logo.png'; then in the VerticalTimelineElement component : icon={<img src={myLogo} alt="myLogo" />} This should also work with jpeg, svg, ... Hope it helps !

MarkusWirth commented 2 years ago

Thanks a lot for your work. How is it possible to change the border color of the round element the icon is integrated?