Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Provider): add ProviderBoxProps and div attributes to ProviderProps #1601

Merged
merged 2 commits into from
Jul 9, 2019

Conversation

miroslavstastny
Copy link
Member

Provider by default renders ProviderBox which by default renders a div.

child props

Provider only accepted ProviderProps. It was not possible to pass any ProviderBox props (like styles) or div attributes (like id).

Now it accepts all of these.

theme prop

Previously, theme was required prop. But as new props were added to the Provider, it now makes sense to instantiate the Provider without the theme just changing other params (rtl).

This PR makes theme optional.

This still does not make sense for top level provider but there already is a runtime check for that.

Fixes #1424.

@codecov
Copy link

codecov bot commented Jul 9, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1601   +/-   ##
=======================================
  Coverage   71.68%   71.68%           
=======================================
  Files         847      847           
  Lines        6915     6915           
  Branches     1965     1985   +20     
=======================================
  Hits         4957     4957           
  Misses       1952     1952           
  Partials        6        6
Impacted Files Coverage Δ
...ackages/react/src/components/Provider/Provider.tsx 95.34% <ø> (ø) ⬆️

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 9717c1a...6dbe00d. Read the comment docs.

@miroslavstastny miroslavstastny merged commit 5e7b26f into master Jul 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/provider-props-typings branch July 9, 2019 12:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider doesn't receive styles prop as of 0.31.0
2 participants