-
Notifications
You must be signed in to change notification settings - Fork 158
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 fix/content-group-simple_stories
- Loading branch information
Showing
6 changed files
with
133 additions
and
76 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
49 changes: 49 additions & 0 deletions
49
...nents/src/components/feature-card-block-medium/feature-card-block-medium-block-heading.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,49 @@ | ||
/** | ||
* @license | ||
* | ||
* Copyright IBM Corp. 2020, 2021 | ||
* | ||
* 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, property, customElement, LitElement } from 'lit-element'; | ||
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js'; | ||
import styles from './feature-card-block-medium.scss'; | ||
|
||
const { stablePrefix: ddsPrefix } = ddsSettings; | ||
|
||
/** | ||
* The block heading content of feature card block medium. | ||
* | ||
* @element dds-feature-card-block-medium-block-heading | ||
*/ | ||
@customElement(`${ddsPrefix}-feature-card-block-medium-block-heading`) | ||
class DDSFeatureCardBlockMediumBlockHeading extends LitElement { | ||
/** | ||
* The shadow slot this block heading should be in. | ||
*/ | ||
@property({ reflect: true }) | ||
slot = 'block-heading'; | ||
|
||
connectedCallback() { | ||
if (!this.hasAttribute('role')) { | ||
this.setAttribute('role', 'heading'); | ||
} | ||
if (!this.hasAttribute('aria-level')) { | ||
this.setAttribute('aria-level', '3'); | ||
} | ||
super.connectedCallback(); | ||
} | ||
|
||
render() { | ||
return html` | ||
<slot></slot> | ||
`; | ||
} | ||
|
||
// `styles` here is a `CSSResult` generated by custom WebPack loader | ||
static styles = styles; | ||
} | ||
|
||
export default DDSFeatureCardBlockMediumBlockHeading; |
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