[go: nahoru, domu]

Skip to content

Commit

Permalink
feat: [code-1642] added copy button for relative file path (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapoor10 authored and Harness committed Mar 21, 2024
1 parent fd2f3c1 commit 6b19bb4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import React, { useMemo } from 'react'
import { Container, Layout, Button, FlexExpander, ButtonVariation, Text } from '@harnessio/uicore'
import { Container, Layout, Button, FlexExpander, ButtonVariation, Text, ButtonSize } from '@harnessio/uicore'
import cx from 'classnames'
import { Icon } from '@harnessio/icons'
import { Color } from '@harnessio/design-system'
Expand All @@ -33,6 +33,7 @@ import { useGetSpaceParam } from 'hooks/useGetSpaceParam'
import { permissionProps } from 'utils/Utils'
import CodeSearch from 'components/CodeSearch/CodeSearch'
import { useDocumentTitle } from 'hooks/useDocumentTitle'
import { CopyButton } from 'components/CopyButton/CopyButton'
import css from './ContentHeader.module.scss'

export function ContentHeader({
Expand Down Expand Up @@ -122,6 +123,7 @@ export function ContentHeader({
)
}}
/>
{resourcePath && <CopyButton content={resourcePath} icon={CodeIcon.Copy} size={ButtonSize.MEDIUM} />}
</Layout.Horizontal>
</Container>
<FlexExpander />
Expand Down

0 comments on commit 6b19bb4

Please sign in to comment.