Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): component type should accept react-router Link #3077

Merged
merged 1 commit into from Oct 8, 2019

Conversation

@boaz0
Copy link
Member

boaz0 commented Oct 6, 2019

What:

closes #2980

ReactNode is any of the following types: ReactChild, ReactFragment, ReactPortal, boolean, null, undefined.[1]

While Link is a component type: ComponentClass or FunctionComponent.[2]

This PR adds ComponentType to the type of component. I did set it to any to allow other router components in the future or a custom router link. But if we want to support only react-router Link I can add a specific type to the component type there.

[1]https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L191
[2]https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L71

//cc @AlexSCorey

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Oct 6, 2019

PatternFly-React preview: https://patternfly-react-pr-3077.surge.sh

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 6, 2019

Codecov Report

Merging #3077 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3077      +/-   ##
==========================================
- Coverage   69.02%   69.02%   -0.01%     
==========================================
  Files         858      858              
  Lines       23430    23413      -17     
  Branches     1859     1853       -6     
==========================================
- Hits        16172    16160      -12     
+ Misses       6337     6333       -4     
+ Partials      921      920       -1
Flag Coverage Δ
#misc 95.45% <ø> (ø) ⬆️
#patternfly3 69.22% <ø> (ø) ⬆️
#patternfly4 68.09% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
...nfly-4/react-core/src/components/Button/Button.tsx 88.23% <ø> (ø) ⬆️
...fly-4/react-core/src/components/ChipGroup/Chip.tsx 82.85% <0%> (+4.01%) ⬆️

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 293b23b...b07e39c. Read the comment docs.

@dlabaj dlabaj requested review from redallen, jgiardino and jschuler and removed request for jgiardino Oct 7, 2019
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
@boaz0 boaz0 force-pushed the boaz0:closes_2980 branch from 632c48b to b07e39c Oct 7, 2019
@redallen redallen merged commit 85c8e29 into patternfly:master Oct 8, 2019
8 checks passed
8 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_integration Your tests passed on CircleCI!
Details
ci/circleci: build_pf3_docs Your tests passed on CircleCI!
Details
ci/circleci: build_pf4_docs Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_jest_other Your tests passed on CircleCI!
Details
ci/circleci: test_jest_pf4 Your tests passed on CircleCI!
Details
ci/circleci: upload_docs Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.