Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(link-list): add missing mixin #4632

Merged
merged 2 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ import '@carbon/ibmdotcom-web-components/es/components/card-link/card-link.js';

```html
<dds-link-list>
<dds-link-list-item>

</dds-link-list-item>
<dds-link-list-item></dds-link-list-item>
<dds-card-link href="https://example.com">
<p>Copy text</p>
<svg slot="footer" focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" width="20" height="20" viewBox="0 0 20 20">
<svg
slot="footer"
focusable="false"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
aria-hidden="true"
width="20"
height="20"
viewBox="0 0 20 20"
>
<path d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"></path>
</svg>
</dds-card-link>
Expand All @@ -42,4 +50,12 @@ import '@carbon/ibmdotcom-web-components/es/components/card-link/card-link.js';

<Props of="dds-link-list" />

## Stable selectors

See [our README](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/tree/master/packages/web-components#stable-selectors-for-analytics-and-integratione2e-testing-in-web-components) to see how Web Components selector and `data-autoid` should be used.

| Web Components selector | Compatibility selector | Description |
| ----------------------- | ---------------------------- | ----------- |
| `<dds-link-list>` | data-autoid="dds--link-list" | Component |

<Description markdown={contributing} />
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { customElement, html, LitElement, property } from 'lit-element';
import settings from 'carbon-components/es/globals/js/settings';
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings';
import sameHeight from '@carbon/ibmdotcom-utilities/es/utilities/sameHeight/sameHeight';
import StableSelectorMixin from '../../globals/mixins/stable-selector';
import styles from './link-list.scss';

const { prefix } = settings;
Expand Down Expand Up @@ -47,7 +48,7 @@ export enum LINK_LIST_TYPE {
* @slot heading - The heading content.
*/
@customElement(`${ddsPrefix}-link-list`)
class DDSLinkList extends LitElement {
class DDSLinkList extends StableSelectorMixin(LitElement) {
static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader

private childItems;
Expand Down