refactor: Improve padding in ActionButton and WakeComponent

master^2
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
id={id}
size={"small"}
sx={{ padding: "0.2rem" }}
onFocus={event => event.stopPropagation()}
onClick={handleActionClick}
disabled={disabled}

View File

@ -27,7 +27,14 @@ const ActionsGroup = ({ machine, actions, addLog }) => {
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} />
{mainActions.map(action => (
<ActionButton

View File

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