Skip to content

Commit

Permalink
fix(accordion): apply carbon element decorator for accordion skeleton (
Browse files Browse the repository at this point in the history
…#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) -->
  • Loading branch information
annawen1 authored Aug 26, 2024
1 parent abe133f commit dfdc39b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/grid.css" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/themes.css" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/themes.css" />
<style>
/* Suppress custom element until styles are loaded */
cds-dropdown:not(:defined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<meta charset="UTF-8" />
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>

<link rel="stylesheet" href="src/styles.scss" />
<style>
/* Suppress custom element until styles are loaded */
cds-dropdown:not(:defined) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2023
* Copyright IBM Corp. 2019, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import { classMap } from 'lit/directives/class-map.js';
import { LitElement, html } from 'lit';
import { property, customElement } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { prefix } from '../../globals/settings';
import { ACCORDION_ALIGNMENT } from './accordion';
import { forEach } from '../../globals/internal/collection-helpers';
Expand All @@ -18,6 +18,8 @@ import './accordion-item-skeleton';
import '../skeleton-text/index';
import styles from './accordion.scss';

import { carbonElement as customElement } from '../../globals/decorators/carbon-element';

/**
* Skeleton of code snippet.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/**
* @license
*
* Copyright IBM Corp. 2021, 2023
* Copyright IBM Corp. 2021, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import '../select/select-item';
import '../select/select';
import './pagination';

0 comments on commit dfdc39b

Please sign in to comment.