-
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.
chore(content-block): reorganize slots (#4869)
### Related Ticket(s) Refs #4627. Refs #4851. ### Description Unifies the slot name strategy, using the default slot for child contents, and `copy` slot for copy contents, for `<dds-content-block>`, `<dds-content-group>` and their descendants. Such unification allows us to reduce the overrides, especially for slot names and layout, in the descendants on top of the ancestor components. `<dds-content-block-copy>` now sets `copy` slot automatically. `<dds-content-block-headlines-item>` no longer sets the slot. Also: * Ensures that `<div>`s surrounding copy, media, etc. contents won't be rendered unless the corresponding contents are there. * Introduces `size="sm"` option to `<dds-content-block-copy>`, so we can use it instead of `<dds-content-item-copy>` in `<dds-content-block>`, `<dds-content-group>` and their descendants. * Introduces `<dds-content-group-copy>` so we can apply styling specific to content group. ### Changelog **New** - `size="sm"` option to `<dds-content-block-copy>`. - `<dds-content-group-copy>`, the copy content of content group. **Changed** - Changes to unify the slot name strategy, using the default slot for child contents, and `copy` slot for copy contents, for `<dds-content-block>`, `<dds-content-group>` and their descendants. - `<dds-content-block-copy>` to set `copy` slot automatically - `<dds-content-block-headlines-item>` to no longer set the slot. - Changes to ensure that `<div>`s surrounding copy, media, etc. contents won't be rendered unless the corresponding contents are there.
- Loading branch information
Showing
64 changed files
with
635 additions
and
420 deletions.
There are no files selected for viewing
14 changes: 7 additions & 7 deletions
14
packages/styles/scss/components/content-group-pictograms/_content-group-pictograms.scss
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
10 changes: 5 additions & 5 deletions
10
packages/styles/scss/components/content-group-simple/_content-group-simple.scss
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
4 changes: 2 additions & 2 deletions
4
packages/web-components/examples/codesandbox/components/callout-with-media/src/index.js
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
/** | ||
* @license | ||
* | ||
* Copyright IBM Corp. 2020 | ||
* 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 '@carbon/ibmdotcom-web-components/es/components/content-block/content-block-copy.js'; | ||
import '@carbon/ibmdotcom-web-components/es/components/content-block/content-block-heading.js'; | ||
import '@carbon/ibmdotcom-web-components/es/components/content-item/content-item-copy.js'; | ||
import '@carbon/ibmdotcom-web-components/es/components/callout-with-media/callout-with-media.js'; | ||
import '@carbon/ibmdotcom-web-components/es/components/callout-with-media/callout-with-media-image.js'; |
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
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
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
Oops, something went wrong.