diff --git a/vuu-ui/packages/vuu-layout/src/layout-header/ActionButton.tsx b/vuu-ui/packages/vuu-layout/src/layout-header/ActionButton.tsx index bd1dc385d..9baf38292 100644 --- a/vuu-ui/packages/vuu-layout/src/layout-header/ActionButton.tsx +++ b/vuu-ui/packages/vuu-layout/src/layout-header/ActionButton.tsx @@ -1,22 +1,33 @@ -import classnames from 'classnames'; -import { HTMLAttributes, MouseEvent } from 'react'; +import classnames from "clsx"; +import { HTMLAttributes, MouseEvent } from "react"; -export interface ActionButtonProps extends Omit, 'onClick'> { - actionId: 'maximize' | 'minimize' | 'restore' | 'tearout'; +export interface ActionButtonProps + extends Omit, "onClick"> { + actionId: "maximize" | "minimize" | "restore" | "tearout"; iconName?: string; - onClick: (evt: MouseEvent, actionId: 'maximize' | 'minimize' | 'restore' | 'tearout') => void; + onClick: ( + evt: MouseEvent, + actionId: "maximize" | "minimize" | "restore" | "tearout" + ) => void; } -const ActionButton = ({ actionId, className, iconName, onClick, ...props }: ActionButtonProps) => { +const ActionButton = ({ + actionId, + className, + iconName, + onClick, + ...props +}: ActionButtonProps) => { const handleClick = (evt: MouseEvent) => { onClick(evt, actionId); }; return ( + title="Close View" + > ); }; diff --git a/vuu-ui/packages/vuu-shell/src/connection-status/ConnectionStatusIcon.tsx b/vuu-ui/packages/vuu-shell/src/connection-status/ConnectionStatusIcon.tsx index 2a3456db6..2cf5c3e3c 100644 --- a/vuu-ui/packages/vuu-shell/src/connection-status/ConnectionStatusIcon.tsx +++ b/vuu-ui/packages/vuu-shell/src/connection-status/ConnectionStatusIcon.tsx @@ -1,49 +1,58 @@ -import React, { useEffect, useState } from 'react'; -import cx from 'classnames'; -import './ConnectionStatusIcon.css'; +import React, { useEffect, useState } from "react"; +import cx from "clsx"; -type connectionStatus = 'connected' | 'reconnected' | 'connecting' | 'disconnected'; +import "./ConnectionStatusIcon.css"; + +type connectionStatus = + | "connected" + | "reconnected" + | "connecting" + | "disconnected"; interface ConnectionStatusProps { - connectionStatus: connectionStatus - className?: string; - props?: unknown; - element?: string; + connectionStatus: connectionStatus; + className?: string; + props?: unknown; + element?: string; } -export const ConnectionStatusIcon = ({ connectionStatus, className, element = 'span', ...props}: ConnectionStatusProps) => { - const [classBase, setClassBase] = useState('vuuConnectingStatus'); - useEffect(() => { - switch(connectionStatus) { - case 'connected': - case 'reconnected': - setClassBase('vuuActiveStatus'); - break; - case 'connecting': - setClassBase('vuuConnectingStatus'); - break; - case 'disconnected': - setClassBase('vuuDisconnectedStatus'); - break; - default: - break; - } - }, [connectionStatus]); +export const ConnectionStatusIcon = ({ + connectionStatus, + className, + element = "span", + ...props +}: ConnectionStatusProps) => { + const [classBase, setClassBase] = useState("vuuConnectingStatus"); + useEffect(() => { + switch (connectionStatus) { + case "connected": + case "reconnected": + setClassBase("vuuActiveStatus"); + break; + case "connecting": + setClassBase("vuuConnectingStatus"); + break; + case "disconnected": + setClassBase("vuuDisconnectedStatus"); + break; + default: + break; + } + }, [connectionStatus]); - const statusIcon = React.createElement ( - element, - { - ...props, - className: cx('vuuStatus vuuIcon', classBase, className) - }, - ) + const statusIcon = React.createElement(element, { + ...props, + className: cx("vuuStatus vuuIcon", classBase, className), + }); - return ( - <> -
- {statusIcon} -
Status: {connectionStatus.toUpperCase()}
-
- - ) -} \ No newline at end of file + return ( + <> +
+ {statusIcon} +
+ Status: {connectionStatus.toUpperCase()} +
+
+ + ); +};