paypal / glamorous

DEPRECATED: 💄 Maintainable CSS with React
https://glamorous.rocks
MIT License
3.64k stars 208 forks source link

fix(innerRef): allow ref as object #409

Closed viktorivarsson closed 6 years ago

viktorivarsson commented 6 years ago

React 16.3 comes with a createRef API where you can add ref as an object

What: Allow innerRef to be passed as an object.

Why: Because React 16.3 comes with a createRef API, the ref to elements is not only functions anymore, it may also be objects.

How: I have updated prop type for the innerRef prop as well as the TypeScript interface.

Checklist:

I have updated where I can see that we set types for innerRef, but it would be great if someone took a quick look as well.

I'm happy to update if there are adjustments needed.

kentcdodds commented 6 years ago

Ah, looks like there's an issue with the snapshots. Could you run npm run test:update and commit and push the changes? Thanks!

viktorivarsson commented 6 years ago

Just glad I was able to help! Snapshots are now updated.

codecov-io commented 6 years ago

Codecov Report

Merging #409 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #409   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     10           
  Lines         177    177           
  Branches       50     50           
=====================================
  Hits          177    177
Impacted Files Coverage Δ
src/create-glamorous.js 100% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update edcc9b2...fa0c3e9. Read the comment docs.