@fremtind/jkl-accordion-react
Advanced tools
Comparing version 0.6.1 to 0.7.1
import { ReactNode } from "react"; | ||
interface Props { | ||
children: ReactNode; | ||
className?: string; | ||
} | ||
export declare function Accordion({ children }: Props): JSX.Element; | ||
export declare function Accordion({ children, className }: Props): JSX.Element; | ||
export {}; |
@@ -80,6 +80,8 @@ import React, { useState } from 'react'; | ||
function Accordion(_ref) { | ||
var children = _ref.children; | ||
var children = _ref.children, | ||
_ref$className = _ref.className, | ||
className = _ref$className === void 0 ? "" : _ref$className; | ||
return React.createElement("div", { | ||
"data-testid": "jkl-accordion", | ||
className: "jkl-accordion" | ||
className: "jkl-accordion ".concat(className) | ||
}, children); | ||
@@ -86,0 +88,0 @@ } |
@@ -1,1 +0,1 @@ | ||
import t,{useState as e}from"react";import r from"@nrk/core-toggle/jsx";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,a=!1,c=void 0;try{for(var i,o=t[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){a=!0,c=t}finally{try{n||null==o.return||o.return()}finally{if(a)throw c}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(a){var c=a.children,i=a.title,o=a.startExpanded,l=n(e(void 0!==o&&o),2),d=l[0],m=l[1],s=d?" jkl-accordion-item--expanded":"";return t.createElement("div",{"data-testid":"jkl-accordion-item",className:"jkl-accordion-item".concat(s)},t.createElement("button",{className:"jkl-accordion-item__title",type:"button"},t.createElement("div",{className:"jkl-accordion-item__title-text"},i),t.createElement("div",{className:"jkl-accordion-item__title-icon"})),t.createElement(r,{"data-testid":"jkl-accordion-item__content-wrapper",className:"jkl-accordion-item__content-wrapper",hidden:!d,onToggle:function(){return m(!d)}},t.createElement("div",{className:"jkl-accordion-item__content"},c)))}function c(e){var r=e.children;return t.createElement("div",{"data-testid":"jkl-accordion",className:"jkl-accordion"},r)}export{c as Accordion,a as AccordionItem}; | ||
import t,{useState as e}from"react";import n from"@nrk/core-toggle/jsx";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,a=!1,c=void 0;try{for(var o,i=t[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){a=!0,c=t}finally{try{r||null==i.return||i.return()}finally{if(a)throw c}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(a){var c=a.children,o=a.title,i=a.startExpanded,l=r(e(void 0!==i&&i),2),d=l[0],m=l[1],s=d?" jkl-accordion-item--expanded":"";return t.createElement("div",{"data-testid":"jkl-accordion-item",className:"jkl-accordion-item".concat(s)},t.createElement("button",{className:"jkl-accordion-item__title",type:"button"},t.createElement("div",{className:"jkl-accordion-item__title-text"},o),t.createElement("div",{className:"jkl-accordion-item__title-icon"})),t.createElement(n,{"data-testid":"jkl-accordion-item__content-wrapper",className:"jkl-accordion-item__content-wrapper",hidden:!d,onToggle:function(){return m(!d)}},t.createElement("div",{className:"jkl-accordion-item__content"},c)))}function c(e){var n=e.children,r=e.className,a=void 0===r?"":r;return t.createElement("div",{"data-testid":"jkl-accordion",className:"jkl-accordion ".concat(a)},n)}export{c as Accordion,a as AccordionItem}; |
@@ -87,6 +87,8 @@ 'use strict'; | ||
function Accordion(_ref) { | ||
var children = _ref.children; | ||
var children = _ref.children, | ||
_ref$className = _ref.className, | ||
className = _ref$className === void 0 ? "" : _ref$className; | ||
return React__default.createElement("div", { | ||
"data-testid": "jkl-accordion", | ||
className: "jkl-accordion" | ||
className: "jkl-accordion ".concat(className) | ||
}, children); | ||
@@ -93,0 +95,0 @@ } |
@@ -80,6 +80,8 @@ import React, { useState } from 'react'; | ||
function Accordion(_ref) { | ||
var children = _ref.children; | ||
var children = _ref.children, | ||
_ref$className = _ref.className, | ||
className = _ref$className === void 0 ? "" : _ref$className; | ||
return React.createElement("div", { | ||
"data-testid": "jkl-accordion", | ||
className: "jkl-accordion" | ||
className: "jkl-accordion ".concat(className) | ||
}, children); | ||
@@ -86,0 +88,0 @@ } |
@@ -1,1 +0,1 @@ | ||
import t,{useState as e}from"react";import r from"@nrk/core-toggle/jsx";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,a=!1,c=void 0;try{for(var i,o=t[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){a=!0,c=t}finally{try{n||null==o.return||o.return()}finally{if(a)throw c}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(a){var c=a.children,i=a.title,o=a.startExpanded,l=n(e(void 0!==o&&o),2),d=l[0],m=l[1],s=d?" jkl-accordion-item--expanded":"";return t.createElement("div",{"data-testid":"jkl-accordion-item",className:"jkl-accordion-item".concat(s)},t.createElement("button",{className:"jkl-accordion-item__title",type:"button"},t.createElement("div",{className:"jkl-accordion-item__title-text"},i),t.createElement("div",{className:"jkl-accordion-item__title-icon"})),t.createElement(r,{"data-testid":"jkl-accordion-item__content-wrapper",className:"jkl-accordion-item__content-wrapper",hidden:!d,onToggle:function(){return m(!d)}},t.createElement("div",{className:"jkl-accordion-item__content"},c)))}function c(e){var r=e.children;return t.createElement("div",{"data-testid":"jkl-accordion",className:"jkl-accordion"},r)}export{c as Accordion,a as AccordionItem}; | ||
import t,{useState as e}from"react";import n from"@nrk/core-toggle/jsx";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,a=!1,c=void 0;try{for(var o,i=t[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){a=!0,c=t}finally{try{r||null==i.return||i.return()}finally{if(a)throw c}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(a){var c=a.children,o=a.title,i=a.startExpanded,l=r(e(void 0!==i&&i),2),d=l[0],m=l[1],s=d?" jkl-accordion-item--expanded":"";return t.createElement("div",{"data-testid":"jkl-accordion-item",className:"jkl-accordion-item".concat(s)},t.createElement("button",{className:"jkl-accordion-item__title",type:"button"},t.createElement("div",{className:"jkl-accordion-item__title-text"},o),t.createElement("div",{className:"jkl-accordion-item__title-icon"})),t.createElement(n,{"data-testid":"jkl-accordion-item__content-wrapper",className:"jkl-accordion-item__content-wrapper",hidden:!d,onToggle:function(){return m(!d)}},t.createElement("div",{className:"jkl-accordion-item__content"},c)))}function c(e){var n=e.children,r=e.className,a=void 0===r?"":r;return t.createElement("div",{"data-testid":"jkl-accordion",className:"jkl-accordion ".concat(a)},n)}export{c as Accordion,a as AccordionItem}; |
@@ -6,2 +6,26 @@ # Change Log | ||
## [0.7.1](https://github.com/fremtind/jokul/compare/@fremtind/jkl-accordion-react@0.7.0...@fremtind/jkl-accordion-react@0.7.1) (2019-07-31) | ||
**Note:** Version bump only for package @fremtind/jkl-accordion-react | ||
# [0.7.0](https://github.com/fremtind/jokul/compare/@fremtind/jkl-accordion-react@0.6.1...@fremtind/jkl-accordion-react@0.7.0) (2019-07-30) | ||
### Bug Fixes | ||
* **accordion:** make accordion 100% width ([d665fab](https://github.com/fremtind/jokul/commit/d665fab)) | ||
### Features | ||
* **portal:** add components, refactor portal ([7e7d038](https://github.com/fremtind/jokul/commit/7e7d038)) | ||
## [0.6.1](https://github.com/fremtind/jokul/compare/@fremtind/jkl-accordion-react@0.6.0...@fremtind/jkl-accordion-react@0.6.1) (2019-07-18) | ||
@@ -8,0 +32,0 @@ |
{ | ||
"name": "@fremtind/jkl-accordion-react", | ||
"version": "0.6.1", | ||
"version": "0.7.1", | ||
"publishConfig": { | ||
@@ -35,7 +35,7 @@ "access": "public" | ||
"dependencies": { | ||
"@fremtind/jkl-accordion": "^0.6.1", | ||
"@fremtind/jkl-accordion": "^0.6.3", | ||
"@nrk/core-toggle": "^3.0.4" | ||
}, | ||
"devDependencies": { | ||
"@fremtind/browserslist-config-jkl": "^0.3.2", | ||
"@fremtind/browserslist-config-jkl": "^0.3.3", | ||
"npm-run-all": "^4.1.5" | ||
@@ -59,3 +59,3 @@ }, | ||
], | ||
"gitHead": "99afe76bb07eb2fae4da9d9ebae06c0f35ee325a" | ||
"gitHead": "e53a88deb163f984142db08043dad690d010276b" | ||
} |
@@ -1,2 +0,2 @@ | ||
# `@fremtind/jkl-accordion-react` | ||
# [`@fremtind/jkl-accordion-react`](https://fremtind.github.io/jokul/components/accordion/) | ||
@@ -3,0 +3,0 @@ ## Beskrivelse |
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
17929
260