@neovici/cosmoz-tabs 5.4.1 → 5.4.2

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.
package/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  [![Build Status](https://github.com/Neovici/cosmoz-tabs/workflows/Github%20CI/badge.svg)](https://github.com/Neovici/cosmoz-tabs/actions?workflow=Github+CI)
2
- [![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg)](https://codeclimate.com/github/Neovici/cosmoz-tabs)
3
2
  [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/Neovici/cosmoz-tabs)
4
3
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
5
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-tabs",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "description": "A multi views container element that allow navigation between the views using tabs or an accordion.",
5
5
  "keywords": [
6
6
  "web-components"
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable import/group-exports */
2
2
  import { html, useMemo, useCallback, useRef } from 'haunted';
3
+ import { ifDefined } from 'lit-html/directives/if-defined';
3
4
  import { useHashParam } from '@neovici/cosmoz-page-router/lib/use-hash-param';
4
5
 
5
6
  const isValid = (tab) => !tab.hidden && !tab.disabled,
@@ -47,7 +48,8 @@ export const renderTabs = ({ tabs, active, onActivate }) =>
47
48
  ?active=${active.name === tab.name}
48
49
  ?hidden=${tab.hidden}
49
50
  ?disabled=${tab.disabled}
51
+ title=${ifDefined(typeof tab.title === 'string' ? tab.title : undefined)}
50
52
  @click=${onActivate}
51
- >${tab.title}</cosmoz-tab-next
53
+ >${tab.content ?? tab.title}</cosmoz-tab-next
52
54
  >`
53
55
  );