From d5287d3d6311c0f537cc96ed8eba2e661ed79d36 Mon Sep 17 00:00:00 2001 From: Weronika Ciesielska Date: Fri, 24 Nov 2023 12:48:02 +0100 Subject: [PATCH] feat: add post title to delete modal --- .gitignore | 1 + src/screens/admin/components/blog-posts/component.js | 6 +++--- src/screens/admin/components/blog-posts/style.scss | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7db80cb..3698ee4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ yarn-error.log .env .eslintcache +.vscode diff --git a/src/screens/admin/components/blog-posts/component.js b/src/screens/admin/components/blog-posts/component.js index a7f151b..55f6077 100644 --- a/src/screens/admin/components/blog-posts/component.js +++ b/src/screens/admin/components/blog-posts/component.js @@ -31,7 +31,7 @@ const BlogPost = ({ post, onClickEdit, onDelete }) => { }; const DeleteModal = ({ - handleDelete, isOpen, setIsOpen, + handleDelete, isOpen, setIsOpen, title, }) => { const handleClose = () => setIsOpen(false); const handleOpen = () => setIsOpen(true); @@ -44,7 +44,7 @@ const DeleteModal = ({ ariaHideApp={false} >
- Are you sure you want to delete? + Are you sure you want to delete {`"${title}" `}?
@@ -105,7 +105,7 @@ const BlogPosts = (props) => { (post) => openEditForm(post)} onDelete={() => openDeleteModal(post)} key={post.id} />, )} - +
); diff --git a/src/screens/admin/components/blog-posts/style.scss b/src/screens/admin/components/blog-posts/style.scss index d12b1c2..93da0cb 100644 --- a/src/screens/admin/components/blog-posts/style.scss +++ b/src/screens/admin/components/blog-posts/style.scss @@ -76,4 +76,8 @@ padding-left: 20px; padding-right: 20px; } +} + +.delete-blog-post-title { + font-style: italic; } \ No newline at end of file