diff --git a/packages/components/src/components/tag/tag.scss b/packages/components/src/components/tag/tag.scss index a99c1e51677..ca3ed45aee6 100644 --- a/packages/components/src/components/tag/tag.scss +++ b/packages/components/src/components/tag/tag.scss @@ -74,7 +74,7 @@ display: none; } - > [class^="db-"] { + > :is([class="db-checkbox"], [class="db-radio"], [class="db-link"], [class="db-button"]) { block-size: 100%; } } diff --git a/showcases/patternhub/scripts/utils.js b/showcases/patternhub/scripts/utils.js index 799bfba07b4..e301bd8e873 100644 --- a/showcases/patternhub/scripts/utils.js +++ b/showcases/patternhub/scripts/utils.js @@ -197,6 +197,18 @@ export const getCodeByFramework = ( return `<${tag}${className} ${attributes.join(' ')}${reactSlots}/>`; } + // Workaround for tooltip + if (componentName === 'tooltip') { + return innerContent.replace( + ' attr !== 'content') + .join(' ')}>${ + attributes.find((attr) => attr === 'content') ?? '' + } ${otherSlots}${innerContent} `;