eggheadio / egghead-ui

egghead UI pieces as a package and app
https://styleguide.egghead.io
28 stars 6 forks source link

PropTypes #21

Closed alexeuler closed 7 years ago

alexeuler commented 7 years ago

1) PropTypes now are not working as expected.

Example:

          <LessonCard
            response={{
              title: lesson.title,
              instructor: {
                full_name: lesson.instructor.name,
              },
              duration: lesson.duration,
              lessons: [],
              progress: {
                completed_lesson_count: 0,
                completed_lessons: [],
                current_lesson: { series_rows_order: 1 },
              },
              tech_logo_http_url: props.tag.image,
            }}
          />

I had to specify the progress prop, because o/w the code was throwing exceptions and didn't render. To figure out the cause of this exceptions, I had to dig through the source code of egghead-ui.

It'd be great if I had immediate propTypes warnings about missing data.

2) https://github.com/eggheadio/egghead-ui/blob/master/src/components/Card/StyledCard.js#L231

I think expanded can also be false in this component (used by CourseCard)

tayiorbeii commented 7 years ago

@alleycat-at-git Is this fixed with the updates to egghead-ui ?

trevordmiller commented 7 years ago

Closing as the card components have moved out of egghead-ui and into egghead-rails, since they were prematurely promoted to egghead-ui (they are not used across egghead projects).