From e8db8c610760ff41e072932c86e886c78431140d Mon Sep 17 00:00:00 2001 From: Boaz Poolman Date: Wed, 10 Jul 2024 10:23:57 +0200 Subject: [PATCH] fix: rename design-system components for migtration to v2 --- admin/src/components/ConfigDiff/index.jsx | 29 +++++++++---------- .../ConfigList/ConfigListRow/index.jsx | 4 +-- admin/src/components/ConfigList/index.jsx | 4 +-- admin/src/components/ConfirmModal/index.jsx | 12 ++++---- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/admin/src/components/ConfigDiff/index.jsx b/admin/src/components/ConfigDiff/index.jsx index d80db03..e5adb01 100644 --- a/admin/src/components/ConfigDiff/index.jsx +++ b/admin/src/components/ConfigDiff/index.jsx @@ -3,11 +3,8 @@ import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer-continued'; import { useIntl } from 'react-intl'; import { - ModalLayout, - ModalBody, - ModalHeader, + Modal, Grid, - GridItem, Typography, } from '@strapi/design-system'; @@ -16,32 +13,32 @@ const ConfigDiff = ({ isOpen, onClose, oldValue, newValue, configName }) => { if (!isOpen) return null; return ( - - + {formatMessage({ id: 'config-sync.ConfigDiff.Title' })} {configName} - - - - + + + + {formatMessage({ id: 'config-sync.ConfigDiff.SyncDirectory' })} - - + + {formatMessage({ id: 'config-sync.ConfigDiff.Database' })} - - + + - - + + ); }; diff --git a/admin/src/components/ConfigList/ConfigListRow/index.jsx b/admin/src/components/ConfigList/ConfigListRow/index.jsx index 312cff5..96c7bd3 100644 --- a/admin/src/components/ConfigList/ConfigListRow/index.jsx +++ b/admin/src/components/ConfigList/ConfigListRow/index.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Tr, Td, BaseCheckbox } from '@strapi/design-system'; +import { Tr, Td, Checkbox } from '@strapi/design-system'; const CustomRow = ({ row, checked, updateValue }) => { const { configName, configType, state, onClick } = row; @@ -42,7 +42,7 @@ const CustomRow = ({ row, checked, updateValue }) => { style={{ cursor: 'pointer' }} > - { - setCheckedItems(checkedItems.map(() => value))} diff --git a/admin/src/components/ConfirmModal/index.jsx b/admin/src/components/ConfirmModal/index.jsx index 350070b..162edcc 100644 --- a/admin/src/components/ConfirmModal/index.jsx +++ b/admin/src/components/ConfirmModal/index.jsx @@ -4,8 +4,6 @@ import { useSelector } from 'react-redux'; import { Dialog, - DialogBody, - DialogFooter, Flex, Typography, Button, @@ -23,12 +21,12 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => { if (!isOpen) return null; return ( - - }> + }> @@ -37,7 +35,7 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => { - + {(soft && type === 'import') && ( @@ -53,7 +51,7 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => { )} - { @@ -75,7 +73,7 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => { {formatMessage({ id: `config-sync.popUpWarning.button.${type}` })} )} /> - + ); };