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

Commit

Permalink
fix(Provider|Ref): add displayName property (#836)
Browse files Browse the repository at this point in the history
* fix(Provider|Ref): add `displayName` property

* add changelog entry

* changelog
  • Loading branch information
layershifter authored Feb 5, 2019
1 parent aefc1fa commit c086719
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Generalize size values for `Avatar` and `Status` components @kuzhelov ([#828](https://github.com/stardust-ui/react/pull/828))
- Remove `AvatarPropsWithDefaults` and `StatusPropsWithDefaults` from public API @kuzhelov ([#828](https://github.com/stardust-ui/react/pull/828))
- Rename `combobox` to `root` in `dropdownSearchInputStyles` @layershifter ([#816](https://github.com/stardust-ui/react/pull/816))
- Renamed class names for the slots inside the `ItemLayout` component @mnajdova ([#827](https://github.com/stardust-ui/react/pull/827))
- Renamed class names for the slots inside the `ItemLayout` component @mnajdova ([#827](https://github.com/stardust-ui/react/pull/827))

### Features
- Accessibility for menu divider @jurokapsiar ([#822](https://github.com/stardust-ui/react/pull/822))
Expand All @@ -32,6 +32,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixes
- Fix `Dropdown` component styles regression @Bugaa92 ([#824](https://github.com/stardust-ui/react/pull/824))
- Update vulnerable version of `lodash` dependency @kuzhelov ([#840](https://github.com/stardust-ui/react/pull/840))
- Add `displayName` property to `Ref` and `Provider` components @layershifter ([#836](https://github.com/stardust-ui/react/pull/836))

<!--------------------------------[ v0.19.2 ]------------------------------- -->
## [v0.19.2](https://github.com/stardust-ui/react/tree/v0.19.2) (2019-02-01)
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/Provider/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export interface ProviderProps {
class Provider extends React.Component<ProviderProps> {
staticStylesRendered: boolean = false

static displayName = 'Provider'

static propTypes = {
theme: PropTypes.shape({
siteVariables: PropTypes.object,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const ProviderConsumer: React.SFC<ProviderConsumerProps> = ({ render }) => (
<FelaTheme>{render}</FelaTheme>
)

ProviderConsumer.displayName = 'ProviderConsumer'
ProviderConsumer.propTypes = {
render: PropTypes.func.isRequired,
}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Ref/Ref.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const Ref: React.SFC<ReactPropsStrict<RefProps>> = props => {
return <ElementType innerRef={innerRef}>{child}</ElementType>
}

Ref.displayName = 'Ref'
Ref.propTypes = {
children: PropTypes.element.isRequired,
innerRef: customPropTypes.ref as PropTypes.Requireable<any>,
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/Ref/RefFindNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface RefFindNodeProps extends ChildrenComponentProps<React.ReactElem
}

export default class RefFindNode extends React.Component<RefFindNodeProps> {
static displayName = 'RefFindNode'

static propTypes = {
children: PropTypes.element.isRequired,
innerRef: customPropTypes.ref,
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/Ref/RefForward.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface RefForwardProps
}

export default class RefForward extends React.Component<RefForwardProps> {
static displayName = 'RefForward'

static propTypes = {
children: PropTypes.element.isRequired,
innerRef: customPropTypes.ref,
Expand Down

0 comments on commit c086719

Please sign in to comment.