react-accessible-accordion
Advanced tools
Comparing version 3.3.5 to 4.0.0
@@ -867,4 +867,5 @@ import { createElement, PureComponent, createContext, useState, Fragment } from 'react'; | ||
className = _ref$className === void 0 ? 'accordion__panel' : _ref$className, | ||
region = _ref.region, | ||
id = _ref.id, | ||
rest = _objectWithoutProperties(_ref, ["className", "id"]); | ||
rest = _objectWithoutProperties(_ref, ["className", "region", "id"]); | ||
@@ -878,6 +879,12 @@ var renderChildren = function renderChildren(_ref2) { | ||
var attrs = _objectSpread2(_objectSpread2({}, panelAttributes), {}, { | ||
'aria-labelledby': region ? panelAttributes['aria-labelledby'] : undefined | ||
}); | ||
return /*#__PURE__*/createElement("div", _extends({ | ||
"data-accordion-component": "AccordionItemPanel", | ||
className: className | ||
}, rest, panelAttributes)); | ||
}, rest, attrs, { | ||
role: region ? 'region' : undefined | ||
})); | ||
}; | ||
@@ -884,0 +891,0 @@ |
/// <reference types="react" /> | ||
import { DivAttributes } from '../helpers/types'; | ||
declare type Props = DivAttributes & { | ||
region?: boolean; | ||
className?: string; | ||
}; | ||
declare const AccordionItemPanel: ({ className, id, ...rest }: Props) => JSX.Element; | ||
declare const AccordionItemPanel: ({ className, region, id, ...rest }: Props) => JSX.Element; | ||
export default AccordionItemPanel; |
@@ -871,4 +871,5 @@ (function (global, factory) { | ||
className = _ref$className === void 0 ? 'accordion__panel' : _ref$className, | ||
region = _ref.region, | ||
id = _ref.id, | ||
rest = _objectWithoutProperties(_ref, ["className", "id"]); | ||
rest = _objectWithoutProperties(_ref, ["className", "region", "id"]); | ||
@@ -882,6 +883,12 @@ var renderChildren = function renderChildren(_ref2) { | ||
var attrs = _objectSpread2(_objectSpread2({}, panelAttributes), {}, { | ||
'aria-labelledby': region ? panelAttributes['aria-labelledby'] : undefined | ||
}); | ||
return /*#__PURE__*/React.createElement("div", _extends({ | ||
"data-accordion-component": "AccordionItemPanel", | ||
className: className | ||
}, rest, panelAttributes)); | ||
}, rest, attrs, { | ||
role: region ? 'region' : undefined | ||
})); | ||
}; | ||
@@ -888,0 +895,0 @@ |
{ | ||
"name": "react-accessible-accordion", | ||
"version": "3.3.5", | ||
"version": "4.0.0", | ||
"description": "Accessible Accordion component for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/umd/index.js", |
@@ -158,2 +158,6 @@ [react-accessible-accordion](https://springload.github.io/react-accessible-accordion/) | ||
#### region: `boolean` | ||
Make the element have a region role. | ||
--- | ||
@@ -160,0 +164,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1753
248
82508
21