1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

feat: remove icons to prepare space for bulk toggle (#3796)

This commit is contained in:
Mateusz Kwasniewski 2023-05-17 12:34:28 +02:00 committed by GitHub
parent 6b41cf03a0
commit 8dd70e922a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 30 deletions

View File

@ -1,6 +1,5 @@
import { useState, VFC } from 'react';
import { Button } from '@mui/material';
import { Archive } from '@mui/icons-material';
import { PermissionHOC } from 'component/common/PermissionHOC/PermissionHOC';
import { DELETE_FEATURE } from 'component/providers/AccessProvider/permissions';
import useProject from 'hooks/api/getters/useProject/useProject';
@ -36,7 +35,6 @@ export const ArchiveButton: VFC<IArchiveButtonProps> = ({
{({ hasAccess }) => (
<Button
disabled={!hasAccess || isDialogOpen}
startIcon={<Archive />}
variant="outlined"
size="small"
onClick={() => setIsDialogOpen(true)}

View File

@ -1,5 +1,4 @@
import { useMemo, useState, VFC } from 'react';
import { Label } from '@mui/icons-material';
import { Button } from '@mui/material';
import { ManageBulkTagsDialog } from 'component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog';
import type { FeatureSchema } from 'openapi';
@ -96,7 +95,6 @@ export const ManageTags: VFC<IManageTagsProps> = ({ projectId, data }) => {
{({ hasAccess }) => (
<Button
disabled={!hasAccess || isOpen}
startIcon={<Label />}
variant="outlined"
size="small"
onClick={() => setIsOpen(true)}

View File

@ -1,10 +1,8 @@
import { FC, useMemo, useState } from 'react';
import { Button } from '@mui/material';
import { FileDownload } from '@mui/icons-material';
import type { FeatureSchema } from 'openapi';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { ExportDialog } from 'component/feature/FeatureToggleList/ExportDialog';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { ArchiveButton } from './ArchiveButton';
import { MoreActions } from './MoreActions';
import { ManageTags } from './ManageTags';
@ -46,24 +44,15 @@ export const ProjectFeaturesBatchActions: FC<
return (
<>
<ArchiveButton projectId={projectId} features={selectedIds} />
<ConditionallyRender
condition={Boolean(uiConfig?.flags?.featuresExportImport)}
show={
<Button
startIcon={<FileDownload />}
variant="outlined"
size="small"
onClick={() => setShowExportDialog(true)}
>
Export
</Button>
}
/>
<ManageTags projectId={projectId} data={selectedData} />
<MoreActions projectId={projectId} data={selectedData} />
<ConditionallyRender
condition={Boolean(uiConfig?.flags?.featuresExportImport)}
show={
<ExportDialog
showExportDialog={showExportDialog}
data={selectedData}
@ -71,8 +60,6 @@ export const ProjectFeaturesBatchActions: FC<
environments={environments}
onConfirm={trackExport}
/>
}
/>
</>
);
};