meshtastic/src/components/hardware/Tabs/InfoTab.tsx

49 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-01-19 04:41:44 -08:00
import React from "react";
2022-04-04 05:02:31 -07:00
2023-01-19 04:41:44 -08:00
import { Tab } from "@headlessui/react";
2022-04-04 05:02:31 -07:00
2023-01-19 04:41:44 -08:00
import type { IDevice } from "../../../data/device";
2022-04-04 05:02:31 -07:00
export interface InfoTabProps {
2023-05-11 18:45:34 -07:00
device: IDevice;
2022-04-04 05:02:31 -07:00
}
export const InfoTab = ({ device }: InfoTabProps): JSX.Element => {
2023-05-11 18:45:34 -07:00
return (
<Tab.Panel>
<div className="px-4 py-5 sm:p-0">
<dl className="sm:divide-y sm:divide-gray-200">
<div className="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6">
<dt className="text-sm font-medium text-secondaryInv">
BLE/WiFi Version
</dt>
<dd className="mt-1 flex gap-1 text-sm text-tertiaryInv sm:col-span-2 sm:mt-0">
<span className="rounded-md bg-secondary px-0.5">
{device.specifications.BLEVersion}
</span>
/
<span className="rounded-md bg-secondary px-0.5">
{device.specifications.WiFiVersion}
</span>
</dd>
</div>
<div className="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6">
<dt className="text-sm font-medium text-secondaryInv">
BLE/WiFi Antenna
</dt>
<dd className="mt-1 flex gap-1 text-sm text-tertiaryInv sm:col-span-2 sm:mt-0">
<span className="rounded-md bg-secondary px-0.5">
{device.specifications.BLEAntenna}
</span>
/
<span className="rounded-md bg-secondary px-0.5">
{device.specifications.WiFiAntenna}
</span>
</dd>
</div>
</dl>
</div>
</Tab.Panel>
);
2022-04-04 05:02:31 -07:00
};