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:
parent
6b41cf03a0
commit
8dd70e922a
@ -1,6 +1,5 @@
|
|||||||
import { useState, VFC } from 'react';
|
import { useState, VFC } from 'react';
|
||||||
import { Button } from '@mui/material';
|
import { Button } from '@mui/material';
|
||||||
import { Archive } from '@mui/icons-material';
|
|
||||||
import { PermissionHOC } from 'component/common/PermissionHOC/PermissionHOC';
|
import { PermissionHOC } from 'component/common/PermissionHOC/PermissionHOC';
|
||||||
import { DELETE_FEATURE } from 'component/providers/AccessProvider/permissions';
|
import { DELETE_FEATURE } from 'component/providers/AccessProvider/permissions';
|
||||||
import useProject from 'hooks/api/getters/useProject/useProject';
|
import useProject from 'hooks/api/getters/useProject/useProject';
|
||||||
@ -36,7 +35,6 @@ export const ArchiveButton: VFC<IArchiveButtonProps> = ({
|
|||||||
{({ hasAccess }) => (
|
{({ hasAccess }) => (
|
||||||
<Button
|
<Button
|
||||||
disabled={!hasAccess || isDialogOpen}
|
disabled={!hasAccess || isDialogOpen}
|
||||||
startIcon={<Archive />}
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => setIsDialogOpen(true)}
|
onClick={() => setIsDialogOpen(true)}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { useMemo, useState, VFC } from 'react';
|
import { useMemo, useState, VFC } from 'react';
|
||||||
import { Label } from '@mui/icons-material';
|
|
||||||
import { Button } from '@mui/material';
|
import { Button } from '@mui/material';
|
||||||
import { ManageBulkTagsDialog } from 'component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog';
|
import { ManageBulkTagsDialog } from 'component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageBulkTagsDialog';
|
||||||
import type { FeatureSchema } from 'openapi';
|
import type { FeatureSchema } from 'openapi';
|
||||||
@ -96,7 +95,6 @@ export const ManageTags: VFC<IManageTagsProps> = ({ projectId, data }) => {
|
|||||||
{({ hasAccess }) => (
|
{({ hasAccess }) => (
|
||||||
<Button
|
<Button
|
||||||
disabled={!hasAccess || isOpen}
|
disabled={!hasAccess || isOpen}
|
||||||
startIcon={<Label />}
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => setIsOpen(true)}
|
onClick={() => setIsOpen(true)}
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
import { FC, useMemo, useState } from 'react';
|
import { FC, useMemo, useState } from 'react';
|
||||||
import { Button } from '@mui/material';
|
import { Button } from '@mui/material';
|
||||||
import { FileDownload } from '@mui/icons-material';
|
|
||||||
import type { FeatureSchema } from 'openapi';
|
import type { FeatureSchema } from 'openapi';
|
||||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
import { ExportDialog } from 'component/feature/FeatureToggleList/ExportDialog';
|
import { ExportDialog } from 'component/feature/FeatureToggleList/ExportDialog';
|
||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
|
||||||
import { ArchiveButton } from './ArchiveButton';
|
import { ArchiveButton } from './ArchiveButton';
|
||||||
import { MoreActions } from './MoreActions';
|
import { MoreActions } from './MoreActions';
|
||||||
import { ManageTags } from './ManageTags';
|
import { ManageTags } from './ManageTags';
|
||||||
@ -46,32 +44,21 @@ export const ProjectFeaturesBatchActions: FC<
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ArchiveButton projectId={projectId} features={selectedIds} />
|
<ArchiveButton projectId={projectId} features={selectedIds} />
|
||||||
<ConditionallyRender
|
<Button
|
||||||
condition={Boolean(uiConfig?.flags?.featuresExportImport)}
|
variant="outlined"
|
||||||
show={
|
size="small"
|
||||||
<Button
|
onClick={() => setShowExportDialog(true)}
|
||||||
startIcon={<FileDownload />}
|
>
|
||||||
variant="outlined"
|
Export
|
||||||
size="small"
|
</Button>
|
||||||
onClick={() => setShowExportDialog(true)}
|
|
||||||
>
|
|
||||||
Export
|
|
||||||
</Button>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<ManageTags projectId={projectId} data={selectedData} />
|
<ManageTags projectId={projectId} data={selectedData} />
|
||||||
<MoreActions projectId={projectId} data={selectedData} />
|
<MoreActions projectId={projectId} data={selectedData} />
|
||||||
<ConditionallyRender
|
<ExportDialog
|
||||||
condition={Boolean(uiConfig?.flags?.featuresExportImport)}
|
showExportDialog={showExportDialog}
|
||||||
show={
|
data={selectedData}
|
||||||
<ExportDialog
|
onClose={() => setShowExportDialog(false)}
|
||||||
showExportDialog={showExportDialog}
|
environments={environments}
|
||||||
data={selectedData}
|
onConfirm={trackExport}
|
||||||
onClose={() => setShowExportDialog(false)}
|
|
||||||
environments={environments}
|
|
||||||
onConfirm={trackExport}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user