stephane-monnot / react-vertical-timeline

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

Types Library is Outdated in NPM #106

Closed leejustin closed 2 years ago

leejustin commented 3 years ago

I believe the @types module needs to be updated. It's running on version 3.0.0: https://www.npmjs.com/package/@types/react-vertical-timeline-component

When I'm using TypeScript, the layout only has two options and I'm unable to use 1-column-right.

export interface VerticalTimelineProps {
    animate?: boolean;
    className?: string;
    layout?: '1-column' | '2-columns';
}

I was going to submit a patch but I see it's been set up in the latest code as such:

VerticalTimeline.propTypes = {
  children: PropTypes.oneOfType([
    PropTypes.arrayOf(PropTypes.node),
    PropTypes.node,
  ]).isRequired,
  className: PropTypes.string,
  animate: PropTypes.bool,
  layout: PropTypes.oneOf([
    '1-column-left',
    '1-column',
    '2-columns',
    '1-column-right',
  ]),
};