wellcomecollection.org icon indicating copy to clipboard operation
wellcomecollection.org copied to clipboard

Constrain type on CardOuterComponent

Open davidpmccormick opened this issue 5 months ago • 0 comments

What?

In making the view transitions, we conditionally toggle between the CardOuter and CardOuterTransition styled-components. The ElementType I used (so's not to spend more than a day trying to fix it) is generic and a more constrained type would be more useful for catching typing issues.

Why?

Because we use TypeScript and it works best when types are as constrained as possible.

Done when

  • [ ] the CardOuterComponent type is more constrained than React.ElementType

davidpmccormick avatar Oct 02 '24 12:10 davidpmccormick