From 0518ec4214583bcc26f5b052f02fd93b12a00a77 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 17 Jan 2025 00:16:40 +1100 Subject: bluetoothdevices: make popup window --- src/widgets/popdownwindow.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/popdownwindow.tsx b/src/widgets/popdownwindow.tsx index 8710a59..18e9ae9 100644 --- a/src/widgets/popdownwindow.tsx +++ b/src/widgets/popdownwindow.tsx @@ -5,6 +5,7 @@ import PopupWindow from "./popupwindow"; export default ({ name, count, + countLabel = count.as(c => `${c} ${name.slice(0, -1)}${c === 1 ? "" : "s"}`), headerButtons, emptyIcon, emptyLabel, @@ -12,7 +13,8 @@ export default ({ }: { name: string; count: Binding; - headerButtons: { label: string; onClicked: () => void; className?: Binding }[]; + countLabel?: Binding; + headerButtons: { label: string | Binding; onClicked: () => void; enabled?: Binding }[]; emptyIcon: string; emptyLabel: string; list: JSX.Element; @@ -20,10 +22,15 @@ export default ({ -