refactor: Improve padding in ActionButton and WakeComponent
parent
b695cd6014
commit
4235323c4a
|
@ -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}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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()}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue