diff --git a/packages/web-components/src/components/cta-block/cta-block-item.ts b/packages/web-components/src/components/cta-block/cta-block-item.ts index 84fb41aeca9..f820e48a72b 100644 --- a/packages/web-components/src/components/cta-block/cta-block-item.ts +++ b/packages/web-components/src/components/cta-block/cta-block-item.ts @@ -60,6 +60,7 @@ class DDSCTABlockItem extends StableSelectorMixin(DDSContentItem) { const { name } = target as HTMLSlotElement; const hasContent = (target as HTMLSlotElement) .assignedNodes() + .filter(elem => !(elem as HTMLElement).matches?.((this.constructor as typeof DDSCTABlockItem).selectorButtonGroup)) .some(node => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()); this[slotExistencePropertyNames[name] || '_hasStatistic'] = hasContent; } diff --git a/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.react.tsx b/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.react.tsx index eee8b511c14..e7f01663323 100644 --- a/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.react.tsx +++ b/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.react.tsx @@ -25,8 +25,6 @@ import DDSCTABlockItemRow from '@carbon/ibmdotcom-web-components/es/components-r import DDSCTABlockItem from '@carbon/ibmdotcom-web-components/es/components-react/cta-block/cta-block-item'; import DDSContentItemHeading from '@carbon/ibmdotcom-web-components/es/components-react/content-item/content-item-heading'; import DDSContentItemCopy from '@carbon/ibmdotcom-web-components/es/components-react/content-item/content-item-copy'; -import DDSButtonGroup from '@carbon/ibmdotcom-web-components/es/components-react/button-group/button-group'; -import DDSButtonCTA from '@carbon/ibmdotcom-web-components/es/components-react/cta/button-cta'; import Desktop from '@carbon/pictograms-react/es/desktop/index.js'; import DDSVideoPlayerContainer from '@carbon/ibmdotcom-web-components/es/components-react/video-player/video-player-container'; import DDSLinkList from '@carbon/ibmdotcom-web-components/es/components-react/link-list/link-list'; @@ -49,16 +47,6 @@ const contentItemTypeMap = { ))} ), - button: ({ heading, copy }) => ( - - {heading} - {copy} - - Button 1 - Button 2 - - - ), statistics: ({ heading, copy, links }) => ( 10% @@ -115,7 +103,6 @@ const renderItems = (item, count) => { const contentItemTypeOptions = { Text: 'text', - Button: 'button', Statistics: 'statistics', Pictogram: 'pictogram', Media: 'media', diff --git a/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.ts b/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.ts index 648dd881c96..cda8fa33129 100644 --- a/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.ts +++ b/packages/web-components/src/components/cta-section/__stories__/cta-section.stories.ts @@ -33,16 +33,6 @@ const contentItemTypeMap = { )} `, - button: ({ heading, copy }) => html` - - ${heading} - ${copy} - - Button 1 - Button 2 - - - `, statistics: ({ heading, copy, links }) => html` 10% @@ -109,7 +99,6 @@ const contentItemTypeMap = { const contentItemTypeOptions = { Text: 'text', - Button: 'button', Statistics: 'statistics', Pictogram: 'pictogram', Media: 'media',