refactor: Improve padding in ActionButton and WakeComponent

master
Tudor Stanciu 2024-07-13 19:54:22 +03:00
parent b695cd6014
commit 4235323c4a
3 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,7 @@ const ActionButton = React.forwardRef(props => {
<IconButton <IconButton
id={id} id={id}
size={"small"} size={"small"}
sx={{ padding: "0.2rem" }}
onFocus={event => event.stopPropagation()} onFocus={event => event.stopPropagation()}
onClick={handleActionClick} onClick={handleActionClick}
disabled={disabled} disabled={disabled}

View File

@ -27,7 +27,14 @@ const ActionsGroup = ({ machine, actions, addLog }) => {
return ( return (
<> <>
<div style={{ display: "flex", flexDirection: "row", justifyContent: "flex-end" }}> <div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "flex-end",
alignItems: "center"
}}
>
<WakeComponent machine={machine} addLog={addLog} disabled={!canOperateMachines} /> <WakeComponent machine={machine} addLog={addLog} disabled={!canOperateMachines} />
{mainActions.map(action => ( {mainActions.map(action => (
<ActionButton <ActionButton

View File

@ -95,6 +95,7 @@ const WakeComponent = ({ machine, addLog, disabled }) => {
size={"small"} size={"small"}
disabled={disabled || state.on} disabled={disabled || state.on}
onClick={handleWakeClick} onClick={handleWakeClick}
sx={{ padding: "0.2rem" }}
style={state.on ? { color: "#33cc33" } : undefined} style={state.on ? { color: "#33cc33" } : undefined}
onFocus={event => event.stopPropagation()} onFocus={event => event.stopPropagation()}
> >