@npm_leadtech/legal-lib-components 5.7.5 → 5.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,8 @@ import React from 'react';
3
3
  import { ChevronRight24px } from '../../../../images/componentsSvg/ChevronRight24px';
4
4
  // import './FaqItem.scss'
5
5
  export const FaqItem = ({ slug, title, children, index }) => {
6
- const [isOpen, setIsOpen] = React.useState(index !== 0);
7
- return (_jsxs("article", { className: `faqItem ${isOpen ? 'open' : ''}`, children: [_jsx("div", { id: slug, className: 'fakeAnchor' }), _jsxs("details", { itemProp: 'mainEntity', itemScope: true, itemType: 'https://www.schema.org/Question', className: 'content', open: isOpen ? true : undefined, children: [_jsxs("summary", { role: 'button', tabIndex: index === 0 ? 0 : -1, onClick: () => {
6
+ const [isOpen, setIsOpen] = React.useState(index === 0);
7
+ return (_jsxs("article", { className: `faqItem ${isOpen ? '' : 'open'}`, children: [_jsx("div", { id: slug, className: 'fakeAnchor' }), _jsxs("details", { itemProp: 'mainEntity', itemScope: true, itemType: 'https://www.schema.org/Question', className: 'content', open: index === 0 ? true : false, children: [_jsxs("summary", { role: 'button', tabIndex: index === 0 ? 0 : -1, onClick: () => {
8
8
  setIsOpen(!isOpen);
9
9
  }, onKeyUp: () => {
10
10
  setIsOpen(!isOpen);
@@ -5,17 +5,17 @@ import { type FaqItemProps } from './FaqItemProps'
5
5
  // import './FaqItem.scss'
6
6
 
7
7
  export const FaqItem: React.FC<FaqItemProps> = ({ slug, title, children, index }) => {
8
- const [isOpen, setIsOpen] = React.useState<boolean>(index !== 0)
8
+ const [isOpen, setIsOpen] = React.useState<boolean>(index === 0)
9
9
 
10
10
  return (
11
- <article className={`faqItem ${isOpen ? 'open' : ''}`}>
11
+ <article className={`faqItem ${isOpen ? '' : 'open'}`}>
12
12
  <div id={slug} className='fakeAnchor'></div>
13
13
  <details
14
14
  itemProp='mainEntity'
15
15
  itemScope
16
16
  itemType='https://www.schema.org/Question'
17
17
  className='content'
18
- open={isOpen ? true : undefined}
18
+ open={index === 0 ? true : false}
19
19
  >
20
20
  <summary
21
21
  role='button'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.7.5",
3
+ "version": "5.7.6",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",