diff --git a/packages/ra-ui-materialui/src/input/CheckboxGroupInput.tsx b/packages/ra-ui-materialui/src/input/CheckboxGroupInput.tsx index f57b2399814..be5ea498e83 100644 --- a/packages/ra-ui-materialui/src/input/CheckboxGroupInput.tsx +++ b/packages/ra-ui-materialui/src/input/CheckboxGroupInput.tsx @@ -23,7 +23,7 @@ const sanitizeRestProps = ({ const useStyles = makeStyles(theme => ({ root: {}, label: { - transform: 'translate(0, 1.5px) scale(0.75)', + transform: 'translate(0, 8px) scale(0.75)', transformOrigin: `top ${theme.direction === 'ltr' ? 'left' : 'right'}`, }, })); @@ -97,6 +97,7 @@ const CheckboxGroupInput: FunctionComponent< format, helperText, label, + margin = 'dense', onBlur, onChange, onFocus, @@ -154,7 +155,7 @@ const CheckboxGroupInput: FunctionComponent< return ( diff --git a/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx b/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx index ebb838978d8..e2ec097f990 100644 --- a/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx +++ b/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx @@ -16,11 +16,12 @@ import sanitizeRestProps from './sanitizeRestProps'; import InputHelperText from './InputHelperText'; import RadioButtonGroupInputItem from './RadioButtonGroupInputItem'; -const useStyles = makeStyles({ +const useStyles = makeStyles(theme => ({ label: { - position: 'relative', + transform: 'translate(0, 5px) scale(0.75)', + transformOrigin: `top ${theme.direction === 'ltr' ? 'left' : 'right'}`, }, -}); +})); /** * An Input component for a radio button group, using an array of objects for the options @@ -87,6 +88,7 @@ export const RadioButtonGroupInput: FunctionComponent< format, helperText, label, + margin = 'dense', onBlur, onChange, onFocus, @@ -95,6 +97,7 @@ export const RadioButtonGroupInput: FunctionComponent< optionValue, parse, resource, + row, source, translateChoice, validate, @@ -104,7 +107,6 @@ export const RadioButtonGroupInput: FunctionComponent< const { id, - input, isRequired, meta: { error, touched }, } = useInput({ @@ -122,7 +124,7 @@ export const RadioButtonGroupInput: FunctionComponent< return ( @@ -135,7 +137,7 @@ export const RadioButtonGroupInput: FunctionComponent< /> - + {choices.map(choice => ( } - label={choiceName} + control={} /> ); };