Skip to content

Commit

Permalink
chore(cm): change the Configure the view link icon in the edit view (#…
Browse files Browse the repository at this point in the history
…20274)

* Updated configure the view icon in the edit view

* Removed the functions that were removing the fill from the icons

* removed bad indentation
  • Loading branch information
lucasboilly committed May 14, 2024
1 parent c734c14 commit ead9202
Showing 1 changed file with 4 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useQueryParams,
} from '@strapi/admin/strapi-admin';
import { Flex, SingleSelect, SingleSelectOption, Typography } from '@strapi/design-system';
import { Cog, Pencil, Trash, WarningCircle } from '@strapi/icons';
import { ListPlus, Pencil, Trash, WarningCircle } from '@strapi/icons';
import { useIntl } from 'react-intl';
import { useMatch, useNavigate } from 'react-router-dom';
import { styled } from 'styled-components';
Expand Down Expand Up @@ -376,7 +376,7 @@ const ConfigureTheViewAction: DocumentActionComponent = ({ collectionType, model
id: 'app.links.configure-view',
defaultMessage: 'Configure the view',
}),
icon: <StyledCog />,
icon: <ListPlus />,
onClick: () => {
navigate(`../${collectionType}/${model}/configurations/edit`);
},
Expand All @@ -386,16 +386,6 @@ const ConfigureTheViewAction: DocumentActionComponent = ({ collectionType, model

ConfigureTheViewAction.type = 'configure-the-view';

/**
* Because the icon system is completely broken, we have to do
* this to remove the fill from the cog.
*/
const StyledCog = styled(Cog)`
path {
fill: currentColor;
}
`;

const EditTheModelAction: DocumentActionComponent = ({ model }) => {
const navigate = useNavigate();
const { formatMessage } = useIntl();
Expand All @@ -405,7 +395,7 @@ const EditTheModelAction: DocumentActionComponent = ({ model }) => {
id: 'content-manager.link-to-ctb',
defaultMessage: 'Edit the model',
}),
icon: <StyledPencil />,
icon: <Pencil />,
onClick: () => {
navigate(`/plugins/content-type-builder/content-types/${model}`);
},
Expand All @@ -415,16 +405,6 @@ const EditTheModelAction: DocumentActionComponent = ({ model }) => {

EditTheModelAction.type = 'edit-the-model';

/**
* Because the icon system is completely broken, we have to do
* this to remove the fill from the cog.
*/
const StyledPencil = styled(Pencil)`
path {
fill: currentColor;
}
`;

const DeleteAction: DocumentActionComponent = ({ documentId, model, collectionType, document }) => {
const navigate = useNavigate();
const { formatMessage } = useIntl();
Expand All @@ -440,7 +420,7 @@ const DeleteAction: DocumentActionComponent = ({ documentId, model, collectionTy
id: 'content-manager.actions.delete.label',
defaultMessage: 'Delete document',
}),
icon: <StyledTrash />,
icon: <Trash />,
dialog: {
type: 'dialog',
title: formatMessage({
Expand Down Expand Up @@ -510,16 +490,6 @@ const DeleteAction: DocumentActionComponent = ({ documentId, model, collectionTy

DeleteAction.type = 'delete';

/**
* Because the icon system is completely broken, we have to do
* this to remove the fill from the cog.
*/
const StyledTrash = styled(Trash)`
path {
fill: currentColor;
}
`;

const DEFAULT_HEADER_ACTIONS = [EditTheModelAction, ConfigureTheViewAction, DeleteAction];

export { Header, DEFAULT_HEADER_ACTIONS };
Expand Down

0 comments on commit ead9202

Please sign in to comment.