-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/overflow-animation
- Loading branch information
Showing
16 changed files
with
429 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/web-components/src/components/cta/link-list-item-card-cta.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* @license | ||
* | ||
* Copyright IBM Corp. 2020 | ||
* | ||
* 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 { html, css, customElement } from 'lit-element'; | ||
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js'; | ||
import DDSCardCTA from './card-cta'; | ||
import styles from '../link-list/link-list.scss'; | ||
|
||
const { stablePrefix: ddsPrefix } = ddsSettings; | ||
|
||
/** | ||
* Link list item card CTA. | ||
* | ||
* @element dds-link-list-item-card-cta | ||
*/ | ||
@customElement(`${ddsPrefix}-link-list-item-card-cta`) | ||
class DDSLinkListItemCardCTA extends DDSCardCTA { | ||
protected _renderImage() { | ||
// Link list doesn't show video thumbnail in card | ||
return html` | ||
<slot name="image" @slotchange="${this._handleSlotChange}"></slot> | ||
`; | ||
} | ||
|
||
connectedCallback() { | ||
if (!this.hasAttribute('role')) { | ||
this.setAttribute('role', 'listitem'); | ||
} | ||
super.connectedCallback(); | ||
} | ||
|
||
// `styles` here is a `CSSResult` generated by custom WebPack loader | ||
static get styles() { | ||
return css`${super.styles}${styles}`; | ||
} | ||
} | ||
|
||
export default DDSLinkListItemCardCTA; |
37 changes: 37 additions & 0 deletions
37
packages/web-components/src/components/cta/link-list-item-cta.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* @license | ||
* | ||
* Copyright IBM Corp. 2020 | ||
* | ||
* 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 { css, customElement } from 'lit-element'; | ||
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js'; | ||
import DDSTextCTA from './text-cta'; | ||
import styles from '../link-list/link-list.scss'; | ||
|
||
const { stablePrefix: ddsPrefix } = ddsSettings; | ||
|
||
/** | ||
* Link list item CTA. | ||
* | ||
* @element dds-link-list-item-cta | ||
*/ | ||
@customElement(`${ddsPrefix}-link-list-item-cta`) | ||
class DDSLinkListItemCTA extends DDSTextCTA { | ||
connectedCallback() { | ||
if (!this.hasAttribute('role')) { | ||
this.setAttribute('role', 'listitem'); | ||
} | ||
super.connectedCallback(); | ||
} | ||
|
||
// `styles` here is a `CSSResult` generated by custom WebPack loader | ||
static get styles() { | ||
return css`${super.styles}${styles}`; | ||
} | ||
} | ||
|
||
export default DDSLinkListItemCTA; |
Oops, something went wrong.