From d6ab27bc48b8664e43688d7dcf2ad3f072212d3f Mon Sep 17 00:00:00 2001 From: klesaulnier <42617371+klesaulnier@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:50:06 +0200 Subject: [PATCH] Improve checkbox list to make is easier to customize (#566) Signed-off-by: LE SAULNIER Kevin --- demo/src/app.jsx | 23 +++++--- .../checkBoxList/CheckBoxListItem.tsx | 18 ++++-- .../checkBoxList/CheckBoxListItems.tsx | 30 +++++----- .../checkBoxList/ClickableCheckBoxItem.tsx | 4 +- .../checkBoxList/ClickableRowItem.tsx | 36 ++++++++++-- .../DraggableCheckBoxListItem.tsx | 13 +++-- .../DraggableClickableCheckBoxItem.tsx | 4 +- .../DraggableClickableRowItem.tsx | 31 ++++++++-- .../checkBoxList/checkBoxList.type.ts | 56 +++++++++++++------ 9 files changed, 152 insertions(+), 63 deletions(-) diff --git a/demo/src/app.jsx b/demo/src/app.jsx index 77c70efa..6d355e66 100644 --- a/demo/src/app.jsx +++ b/demo/src/app.jsx @@ -569,11 +569,12 @@ function AppContent({ language, onLanguageClick }) { }, ]); - const secondaryAction = () => ( - - - - ); + const secondaryAction = (item, isItemHovered) => + isItemHovered && ( + + + + ); const defaultTab = (
@@ -613,8 +614,6 @@ function AppContent({ language, onLanguageClick }) { divider secondaryAction={secondaryAction} addSelectAllCheckbox - isCheckboxClickableOnly - enableSecondaryActionOnHover />