mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
Wrap feature flag key name in CopyToClipboardInline (#4322)
This commit is contained in:
parent
ffac7d1b1e
commit
1df3428f7d
@ -11,6 +11,7 @@ import { createdAtColumn, createdByColumn } from 'lib/components/Table'
|
||||
import { FeatureFlagGroupType, FeatureFlagType } from '~/types'
|
||||
import { router } from 'kea-router'
|
||||
import { LinkButton } from 'lib/components/LinkButton'
|
||||
import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'
|
||||
|
||||
export function FeatureFlags(): JSX.Element {
|
||||
const { featureFlags, featureFlagsLoading } = useValues(featureFlagsLogic)
|
||||
@ -27,14 +28,18 @@ export function FeatureFlags(): JSX.Element {
|
||||
sorter: (a: FeatureFlagType, b: FeatureFlagType) => ('' + a.key).localeCompare(b.key),
|
||||
render: function Render(_: string, featureFlag: FeatureFlagType) {
|
||||
return (
|
||||
<>
|
||||
{!featureFlag.active && (
|
||||
<Tooltip title="This feature flag is disabled.">
|
||||
<DisconnectOutlined style={{ marginRight: 4 }} />
|
||||
</Tooltip>
|
||||
)}
|
||||
{featureFlag.key}
|
||||
</>
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<CopyToClipboardInline iconPosition="start" explicitValue={featureFlag.key}>
|
||||
<>
|
||||
{!featureFlag.active && (
|
||||
<Tooltip title="This feature flag is disabled.">
|
||||
<DisconnectOutlined style={{ marginRight: 4 }} />
|
||||
</Tooltip>
|
||||
)}
|
||||
{featureFlag.key}
|
||||
</>
|
||||
</CopyToClipboardInline>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user