Skip to content

Commit

Permalink
feat(Portal): copy icon name to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
thaytharma authored Jun 5, 2023
1 parent d9cf0bb commit 3c1944c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -115,7 +116,9 @@ export default class ListAllIcons extends React.PureComponent {
element="figcaption"
useSlug={iconName}
>
{iconName}
<Copy>
{iconName}
</Copy>
</AutoLinkHeader>

<P>{tags.length > 0 ? tags.join(', ') : '(no tags)'}</P>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 3c1944c

@vercel
Copy link

@vercel vercel bot commented on 3c1944c Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.