From 3c1944ce9a5ccccc1b1a0a72cf03d139db7ba45b Mon Sep 17 00:00:00 2001 From: Thayanan Tharmapalan Date: Mon, 5 Jun 2023 09:45:30 +0200 Subject: [PATCH] feat(Portal): copy icon name to clipboard --- .../src/shared/parts/icons/ListAllIcons.js | 5 ++++- .../prebuild/tasks/generateTypes/fetchPropertiesFromDocs.js | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/dnb-design-system-portal/src/shared/parts/icons/ListAllIcons.js b/packages/dnb-design-system-portal/src/shared/parts/icons/ListAllIcons.js index 4704ed5fd6c..bea225fe560 100644 --- a/packages/dnb-design-system-portal/src/shared/parts/icons/ListAllIcons.js +++ b/packages/dnb-design-system-portal/src/shared/parts/icons/ListAllIcons.js @@ -12,6 +12,7 @@ import * as PrimaryIconsMedium from '@dnb/eufemia/src/icons/dnb/primary_icons_me import * as SecondaryIconsMedium from '@dnb/eufemia/src/icons/dnb/secondary_icons_medium' import iconsMetaData from '@dnb/eufemia/src/icons/dnb/icons-meta.json' import AutoLinkHeader from '../../tags/AutoLinkHeader' +import Copy from '../../tags/Copy' import { listStyle, listItemStyle, @@ -115,7 +116,9 @@ export default class ListAllIcons extends React.PureComponent { element="figcaption" useSlug={iconName} > - {iconName} + + {iconName} +

{tags.length > 0 ? tags.join(', ') : '(no tags)'}

diff --git a/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/fetchPropertiesFromDocs.js b/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/fetchPropertiesFromDocs.js index b4267e03c9d..cfd41093c72 100644 --- a/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/fetchPropertiesFromDocs.js +++ b/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/fetchPropertiesFromDocs.js @@ -53,8 +53,7 @@ function extractPathParts({ file }) { * we only use it for the warning method: warnAboutMissingPropTypes * * In other words, do not warn when, - * - * he component dir is different from the component name + * the component dir is different from the component name */ const unsureSituation = componentDir.split('-').length !== tmpComponentName.split('-').length