diff --git a/Components/UI/StorageBar/StorageBar.tsx b/Components/UI/StorageBar/StorageBar.tsx index 62142dc..f6b2fc5 100644 --- a/Components/UI/StorageBar/StorageBar.tsx +++ b/Components/UI/StorageBar/StorageBar.tsx @@ -1,7 +1,12 @@ //Lib import classes from './StorageBar.module.css'; -export default function StorageBar(props) { +type StorageBarProps = { + storageUsed: number; + storageSize: number; +}; + +export default function StorageBar(props: StorageBarProps) { //Var //storageUsed is in kB, storageSize is in GB. Round to 1 decimal for %. const storageUsedPercent = (((props.storageUsed / 1024 ** 2) * 100) / props.storageSize).toFixed( diff --git a/Components/UI/Switch/Switch.tsx b/Components/UI/Switch/Switch.tsx index 36ae47f..89efae1 100644 --- a/Components/UI/Switch/Switch.tsx +++ b/Components/UI/Switch/Switch.tsx @@ -1,7 +1,16 @@ //Lib +import { Optional } from '~/types'; import classes from './Switch.module.css'; -export default function Switch(props) { +type SwitchProps = { + switchName: string; + switchDescription: string; + checked: Optional; + disabled: boolean; + onChange: (checked: boolean) => void; +}; + +export default function Switch(props: SwitchProps) { return ( <>