Skip to content

Commit dfdc39b

Browse files
authored
fix(accordion): apply carbon element decorator for accordion skeleton (#11989)
### Related Ticket(s) Closes # {{Provide issue number link(s) to the related ticket(s) that this pull request addresses}} ### Description Adopter running into issues with accordion component when using the accordion in multiple libraries as the `accordion-skeleton` component is not using the `carbonElement` decorator. This PR also fixes a couple smaller issues with missing the `select` import in the `pagination/index.js` file and missing stylesheet import for the `dropdown` stackblitz example ### Changelog **Changed** - `accordion-skeleton` to use custom `carbonElement` decorator - add `select` import in the `pagination/index.js` file - include stylesheet import in the `dropdown` example <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
1 parent abe133f commit dfdc39b

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

packages/carbon-web-components/examples/codesandbox/basic/components/dropdown/cdn.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link rel="stylesheet"
1515
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
1616
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/grid.css" />
17-
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/themes.css" />
17+
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/themes.css" />
1818
<style>
1919
/* Suppress custom element until styles are loaded */
2020
cds-dropdown:not(:defined) {

packages/carbon-web-components/examples/codesandbox/basic/components/dropdown/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<meta charset="UTF-8" />
1414
<link rel="stylesheet"
1515
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
16+
17+
<link rel="stylesheet" href="src/styles.scss" />
1618
<style>
1719
/* Suppress custom element until styles are loaded */
1820
cds-dropdown:not(:defined) {

packages/carbon-web-components/src/components/accordion/accordion-skeleton.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
* @license
33
*
4-
* Copyright IBM Corp. 2019, 2023
4+
* Copyright IBM Corp. 2019, 2024
55
*
66
* This source code is licensed under the Apache-2.0 license found in the
77
* LICENSE file in the root directory of this source tree.
88
*/
99

1010
import { classMap } from 'lit/directives/class-map.js';
1111
import { LitElement, html } from 'lit';
12-
import { property, customElement } from 'lit/decorators.js';
12+
import { property } from 'lit/decorators.js';
1313
import { prefix } from '../../globals/settings';
1414
import { ACCORDION_ALIGNMENT } from './accordion';
1515
import { forEach } from '../../globals/internal/collection-helpers';
@@ -18,6 +18,8 @@ import './accordion-item-skeleton';
1818
import '../skeleton-text/index';
1919
import styles from './accordion.scss';
2020

21+
import { carbonElement as customElement } from '../../globals/decorators/carbon-element';
22+
2123
/**
2224
* Skeleton of code snippet.
2325
*/
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/**
22
* @license
33
*
4-
* Copyright IBM Corp. 2021, 2023
4+
* Copyright IBM Corp. 2021, 2024
55
*
66
* This source code is licensed under the Apache-2.0 license found in the
77
* LICENSE file in the root directory of this source tree.
88
*/
99

1010
import '../select/select-item';
11+
import '../select/select';
1112
import './pagination';

0 commit comments

Comments
 (0)