fix Switch with label spacing

This commit is contained in:
Sidney Alcantara
2021-11-01 16:09:07 +11:00
parent cfea4fde32
commit 7840b416ad
3 changed files with 7 additions and 17 deletions

View File

@@ -74,10 +74,6 @@ const Settings = ({ config, onChange }) => {
/>
}
label="Set as an action script"
sx={{
alignItems: "center",
"& .MuiFormControlLabel-label": { mt: 0 },
}}
/>
{!Boolean(config.isActionScript) ? (
<TextField
@@ -143,10 +139,6 @@ const Settings = ({ config, onChange }) => {
/>
}
label="User can redo (re-runs the same script)"
sx={{
alignItems: "center",
"& .MuiFormControlLabel-label": { mt: 0 },
}}
/>
<FormControlLabel
control={
@@ -159,10 +151,6 @@ const Settings = ({ config, onChange }) => {
/>
}
label="User can undo"
sx={{
alignItems: "center",
"& .MuiFormControlLabel-label": { mt: 0 },
}}
/>
{config["undo.enabled"] && (
<>

View File

@@ -48,10 +48,6 @@ export default function Settings({ onChange, config }) {
/>
}
label="Show slider steps"
sx={{
alignItems: "center",
"& .MuiFormControlLabel-label": { mt: 0 },
}}
/>
</>
);

View File

@@ -792,7 +792,13 @@ export const components = (theme: Theme): ThemeOptions => {
root: {
display: "flex",
alignItems: "flex-start",
"& .MuiSwitch-root": { marginRight: theme.spacing(1) },
"& .MuiSwitch-root": {
marginRight: theme.spacing(1),
"&.MuiSwitch-sizeSmall + .MuiFormControlLabel-label": {
marginTop: 4,
},
},
},
label: {
marginTop: 10,