mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02:00
feat: export button in flags overview (#9715)
This commit is contained in:
parent
b120c97717
commit
e76d04a7ad
@ -0,0 +1,26 @@
|
|||||||
|
import { IconButton, Tooltip } from '@mui/material';
|
||||||
|
import IosShare from '@mui/icons-material/IosShare';
|
||||||
|
import type { FC } from 'react';
|
||||||
|
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||||
|
|
||||||
|
export const ExportFlags: FC<{ onClick: () => void }> = ({ onClick }) => {
|
||||||
|
const { trackEvent } = usePlausibleTracker();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Tooltip title='Export flags' arrow>
|
||||||
|
<IconButton
|
||||||
|
onClick={() => {
|
||||||
|
onClick();
|
||||||
|
trackEvent('search-feature-buttons', {
|
||||||
|
props: {
|
||||||
|
action: 'export',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
size='small'
|
||||||
|
>
|
||||||
|
<IosShare />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
|
};
|
@ -31,6 +31,7 @@ import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
|||||||
import { useGlobalFeatureSearch } from './useGlobalFeatureSearch';
|
import { useGlobalFeatureSearch } from './useGlobalFeatureSearch';
|
||||||
import { LifecycleFilters } from './FeatureToggleFilters/LifecycleFilters';
|
import { LifecycleFilters } from './FeatureToggleFilters/LifecycleFilters';
|
||||||
import { useUiFlag } from 'hooks/useUiFlag';
|
import { useUiFlag } from 'hooks/useUiFlag';
|
||||||
|
import { ExportFlags } from './ExportFlags';
|
||||||
|
|
||||||
export const featuresPlaceholder = Array(15).fill({
|
export const featuresPlaceholder = Array(15).fill({
|
||||||
name: 'Name of the feature',
|
name: 'Name of the feature',
|
||||||
@ -289,9 +290,17 @@ export const FeatureToggleListTable: VFC = () => {
|
|||||||
>
|
>
|
||||||
View archive
|
View archive
|
||||||
</Link>
|
</Link>
|
||||||
<FeatureToggleListActions
|
{flagsReleaseManagementUIEnabled ? (
|
||||||
onExportClick={() => setShowExportDialog(true)}
|
<ExportFlags
|
||||||
|
onClick={() => setShowExportDialog(true)}
|
||||||
/>
|
/>
|
||||||
|
) : (
|
||||||
|
<FeatureToggleListActions
|
||||||
|
onExportClick={() =>
|
||||||
|
setShowExportDialog(true)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user