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

Commit

Permalink
fix(Provider): add ProviderBoxProps and div attributes to ProviderPro…
Browse files Browse the repository at this point in the history
…ps (#1601)

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

* changelog
  • Loading branch information
miroslavstastny authored Jul 9, 2019
1 parent 9717c1a commit 5e7b26f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix `Dropdown` highlightedIndex on arrow keydown open @silviuavram ([#1570](https://github.com/stardust-ui/react/pull/1570))
- Fix `Dropdown` ArrowLeft keydown behavior for multiple variants @silviuavram ([#1564](https://github.com/stardust-ui/react/pull/1564))
- Fix styles for shadows in `Popup` in Teams theme [redlines] @codepretty ([#1561](https://github.com/stardust-ui/react/pull/1561))
- Fix typings for `Provider` props @miroslavstastny ([#1601](https://github.com/stardust-ui/react/pull/1601))

### Features
- Add ARIA attributes and focus handling for `RadioGroup` in `Toolbar` @sophieH29 ([#1526](https://github.com/stardust-ui/react/pull/1526))
Expand Down
13 changes: 9 additions & 4 deletions packages/react/src/components/Provider/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@ import {

import ProviderConsumer from './ProviderConsumer'
import { mergeSiteVariables } from '../../lib/mergeThemes'
import ProviderBox from './ProviderBox'
import { WithAsProp, ProviderContextInput, ProviderContextPrepared } from '../../types'
import ProviderBox, { ProviderBoxProps } from './ProviderBox'
import {
WithAsProp,
ProviderContextInput,
ProviderContextPrepared,
withSafeTypeForAs,
} from '../../types'
import mergeContexts from '../../lib/mergeProviderContexts'

export interface ProviderProps extends ChildrenComponentProps {
renderer?: Renderer
rtl?: boolean
disableAnimations?: boolean
theme: ThemeInput
theme?: ThemeInput
variables?: ComponentVariablesInput
}

Expand Down Expand Up @@ -183,4 +188,4 @@ class Provider extends React.Component<WithAsProp<ProviderProps>> {
}
}

export default Provider
export default withSafeTypeForAs<typeof Provider, ProviderProps & ProviderBoxProps>(Provider)

0 comments on commit 5e7b26f

Please sign in to comment.