From e525d9e03ad5f3b99f30202ac1f8e779aa790a6c Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Fri, 3 Jan 2025 00:23:10 -0800 Subject: [PATCH] Update how conditional elements are rendered for bar modules. (#688) --- .../bar/modules/bluetooth/index.tsx | 25 +++++++-- src/components/bar/modules/clock/index.tsx | 15 ++++-- src/components/bar/modules/network/index.tsx | 7 ++- .../bar/modules/notifications/index.tsx | 15 ++++-- src/components/bar/modules/volume/index.tsx | 27 +++++++--- .../bar/modules/window_title/index.tsx | 53 ++++++++++++++----- 6 files changed, 105 insertions(+), 37 deletions(-) diff --git a/src/components/bar/modules/bluetooth/index.tsx b/src/components/bar/modules/bluetooth/index.tsx index 473bddc..7f55d80 100644 --- a/src/components/bar/modules/bluetooth/index.tsx +++ b/src/components/bar/modules/bluetooth/index.tsx @@ -11,11 +11,11 @@ import { Astal } from 'astal/gtk3'; const { rightClick, middleClick, scrollDown, scrollUp } = options.bar.bluetooth; const Bluetooth = (): BarBoxChild => { - const btIcon = (isPowered: boolean): JSX.Element => ( + const BluetoothIcon = ({ isPowered }: BluetoothIconProps): JSX.Element => (