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 => (
);
- const btText = (isPowered: boolean, devices: AstalBluetooth.Device[]): JSX.Element => {
+ const BluetoothLabel = ({ isPowered, devices }: BluetoothLabelProps): JSX.Element => {
const connectDevices = devices.filter((device) => device.connected);
const label =
@@ -39,11 +39,17 @@ const Bluetooth = (): BarBoxChild => {
const componentBinding = Variable.derive(
[bind(options.bar.bluetooth.label), bind(bluetoothService, 'isPowered'), bind(bluetoothService, 'devices')],
- (showLabel: boolean, isPowered: boolean, devices: AstalBluetooth.Device[]): JSX.Element[] => {
+ (showLabel: boolean, isPowered: boolean, devices: AstalBluetooth.Device[]): JSX.Element => {
if (showLabel) {
- return [btIcon(isPowered), btText(isPowered, devices)];
+ return (
+
+
+
+
+ );
}
- return [btIcon(isPowered)];
+
+ return ;
},
);
@@ -101,4 +107,13 @@ const Bluetooth = (): BarBoxChild => {
};
};
+interface BluetoothIconProps {
+ isPowered: boolean;
+}
+
+interface BluetoothLabelProps {
+ isPowered: boolean;
+ devices: AstalBluetooth.Device[];
+}
+
export { Bluetooth };
diff --git a/src/components/bar/modules/clock/index.tsx b/src/components/bar/modules/clock/index.tsx
index f490dff..11bd6a0 100644
--- a/src/components/bar/modules/clock/index.tsx
+++ b/src/components/bar/modules/clock/index.tsx
@@ -13,8 +13,8 @@ const { style } = options.theme.bar.buttons;
const time = Variable.derive([systemTime, format], (c, f) => c.format(f) || '');
const Clock = (): BarBoxChild => {
- const clockTime = ;
- const clockIcon = ;
+ const ClockTime = (): JSX.Element => ;
+ const ClockIcon = (): JSX.Element => ;
const componentClassName = Variable.derive(
[bind(style), bind(showIcon), bind(showTime)],
@@ -31,11 +31,16 @@ const Clock = (): BarBoxChild => {
const componentChildren = Variable.derive([bind(showIcon), bind(showTime)], (shIcn, shTm) => {
if (shIcn && !shTm) {
- return [clockIcon];
+ return ;
} else if (shTm && !shIcn) {
- return [clockTime];
+ return ;
}
- return [clockIcon, clockTime];
+ return (
+
+
+
+
+ );
});
const component = (
diff --git a/src/components/bar/modules/network/index.tsx b/src/components/bar/modules/network/index.tsx
index d7cd3c4..9537716 100644
--- a/src/components/bar/modules/network/index.tsx
+++ b/src/components/bar/modules/network/index.tsx
@@ -23,7 +23,7 @@ const Network = (): BarBoxChild => {
},
);
- const networkIcon = ;
+ const NetworkIcon = (): JSX.Element => ;
const networkLabel = Variable.derive(
[
@@ -66,8 +66,6 @@ const Network = (): BarBoxChild => {
},
);
- const componentChildren = [networkIcon, networkLabel()];
-
const component = (
{
componentClassName.drop();
}}
>
- {componentChildren}
+
+ {networkLabel()}
);
diff --git a/src/components/bar/modules/notifications/index.tsx b/src/components/bar/modules/notifications/index.tsx
index 3731a22..aa91f55 100644
--- a/src/components/bar/modules/notifications/index.tsx
+++ b/src/components/bar/modules/notifications/index.tsx
@@ -44,7 +44,7 @@ export const Notifications = (): BarBoxChild => {
) => {
const filteredNotifications = filterNotifications(notif, ignoredNotifs);
- const notifIcon = (
+ const NotifIcon = (): JSX.Element => (