From 387f5259a7757a415f1758e121fc3cc4f7c0dc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:55:33 +0100 Subject: [PATCH] 8928 refactor page header buttons (#8952) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #8928 Capture d’écran 2024-12-09 à 10 26 37 Capture d’écran 2024-12-09 à 10 26 54 --- .../components/PageFavoriteButton.tsx | 27 +++++++----- .../components/RecordIndexPageHeader.tsx | 2 + .../RecordIndexPageKanbanAddButton.tsx | 13 +----- .../components/SignInBackgroundMockPage.tsx | 2 +- .../PageHeaderOpenCommandMenuButton.tsx} | 14 ++++--- .../layout/page/components/PageAddButton.tsx | 11 ++--- .../ui/layout/page/components/PageHeader.tsx | 41 ++++++++++--------- .../components/ShowPageAddButton.tsx | 21 ++++------ .../RecordShowPageBaseHeader.tsx | 4 +- .../src/input/button/components/Button.tsx | 3 ++ 10 files changed, 70 insertions(+), 68 deletions(-) rename packages/twenty-front/src/modules/ui/layout/{show-page/components/ShowPageMoreButton.tsx => page-header/components/PageHeaderOpenCommandMenuButton.tsx} (50%) diff --git a/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx b/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx index 2891c48f46..d5c739df00 100644 --- a/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx +++ b/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx @@ -1,4 +1,4 @@ -import { IconButton, IconHeart } from 'twenty-ui'; +import { Button, IconHeart } from 'twenty-ui'; type PageFavoriteButtonProps = { isFavorite: boolean; @@ -8,13 +8,18 @@ type PageFavoriteButtonProps = { export const PageFavoriteButton = ({ isFavorite, onClick, -}: PageFavoriteButtonProps) => ( - -); +}: PageFavoriteButtonProps) => { + const title = isFavorite ? 'Remove from favorites' : 'Add to favorites'; + return ( +