Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Change focusRef prop-type to any for consent banner and brand #4382

Merged
merged 4 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/psammead-brand/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
| ------- | ----------- |
| 7.1.1 | [PR#4382](https://github.com/bbc/psammead/pull/4382) Change focusRef prop-type |
| 7.1.0 | [PR#4380](https://github.com/bbc/psammead/pull/4380) Add focusRef prop |
| 7.0.31 | [PR#4335](https://github.com/bbc/psammead/pull/4335) switch to yarn for package management |
| 7.0.30 | [PR#4305](https://github.com/bbc/psammead/pull/4305) Talos - Bump Dependencies - @bbc/psammead-script-link |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-brand/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-brand",
"version": "7.1.0",
"version": "7.1.1",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
8 changes: 3 additions & 5 deletions packages/components/psammead-brand/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
node,
shape,
bool,
any,
oneOfType,
func,
instanceOf,
} from 'prop-types';
import VisuallyHiddenText from '@bbc/psammead-visually-hidden-text';
import {
Expand Down Expand Up @@ -274,10 +274,8 @@ Brand.propTypes = {
borderBottom: bool,
scriptLink: node,
skipLink: node,
focusRef: oneOfType([
func,
shape({ current: instanceOf(HTMLAnchorElement) }),
]),
// eslint-disable-next-line react/forbid-prop-types
focusRef: oneOfType([func, shape({ current: any })]),
};

export default Brand;
1 change: 1 addition & 0 deletions packages/components/psammead-consent-banner/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 5.4.1 | [PR#4382](https://github.com/bbc/psammead/pull/4382) Change focusRef prop-type |
| 5.4.0 | [PR#4380](https://github.com/bbc/psammead/pull/4380) Make banner heading focusable |
| 5.3.3 | [PR#4335](https://github.com/bbc/psammead/pull/4335) switch to yarn for package management |
| 5.3.2 | [PR#4304](https://github.com/bbc/psammead/pull/4304) Talos - Bump Dependencies - @bbc/gel-foundations, @bbc/psammead-styles |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-consent-banner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-consent-banner",
"version": "5.4.0",
"version": "5.4.1",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
8 changes: 3 additions & 5 deletions packages/components/psammead-consent-banner/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
shape,
func,
oneOfType,
instanceOf,
any,
} from 'prop-types';
import styled from '@emotion/styled';
import { scriptPropType } from '@bbc/gel-foundations/prop-types';
Expand Down Expand Up @@ -223,10 +223,8 @@ ConsentBanner.propTypes = {
hidden: bool,
script: shape(scriptPropType).isRequired,
service: string.isRequired,
focusRef: oneOfType([
func,
shape({ current: instanceOf(HTMLHeadingElement) }),
]),
// eslint-disable-next-line react/forbid-prop-types
focusRef: oneOfType([func, shape({ current: any })]),
};

ConsentBanner.defaultProps = {
Expand Down