@dartech/arsenal-ui 1.3.38 → 1.3.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -3
- package/package.json +1 -1
- package/src/lib/Forms/ControlRadio.d.ts +4 -1
package/index.js
CHANGED
@@ -593,7 +593,9 @@ const ControlRadio = ({
|
|
593
593
|
labelKey,
|
594
594
|
valueKey,
|
595
595
|
validate,
|
596
|
-
onChange: customOnChange
|
596
|
+
onChange: customOnChange,
|
597
|
+
row,
|
598
|
+
radioProps
|
597
599
|
}) => {
|
598
600
|
const {
|
599
601
|
field: {
|
@@ -633,6 +635,7 @@ const ControlRadio = ({
|
|
633
635
|
}, {
|
634
636
|
children: label
|
635
637
|
})), jsx(RadioGroup, Object.assign({
|
638
|
+
row: row,
|
636
639
|
"aria-labelledby": "radio-buttons-group",
|
637
640
|
ref: ref,
|
638
641
|
name: name,
|
@@ -641,7 +644,7 @@ const ControlRadio = ({
|
|
641
644
|
}, {
|
642
645
|
children: _values.map((item, i) => jsx(FormControlLabel, {
|
643
646
|
value: getValue(item),
|
644
|
-
control: jsx(Radio, {}),
|
647
|
+
control: jsx(Radio, Object.assign({}, radioProps)),
|
645
648
|
label: getLabel(item)
|
646
649
|
}, i))
|
647
650
|
})), !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message) && jsx(FormHelperText, {
|
@@ -3129,7 +3132,10 @@ const StepperView = ({
|
|
3129
3132
|
sx: {
|
3130
3133
|
marginLeft: 4
|
3131
3134
|
}
|
3132
|
-
})
|
3135
|
+
}),
|
3136
|
+
sx: {
|
3137
|
+
width: '100%'
|
3138
|
+
}
|
3133
3139
|
}, {
|
3134
3140
|
children: [data.filter(Boolean).map((item, index) => jsxs(Step, Object.assign({
|
3135
3141
|
expanded: true
|
package/package.json
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { RadioProps } from '@mui/material/Radio';
|
2
3
|
import { Control } from 'react-hook-form';
|
3
4
|
import { ValidateFunc } from '../../interfaces';
|
4
5
|
/**
|
@@ -57,10 +58,12 @@ export interface ControlRadioProps {
|
|
57
58
|
* Key for option value
|
58
59
|
*/
|
59
60
|
valueKey?: string;
|
61
|
+
row?: boolean;
|
62
|
+
radioProps?: RadioProps;
|
60
63
|
}
|
61
64
|
/**
|
62
65
|
* Material UI `Radio` controlled component. Used with react-hook-form
|
63
66
|
* @category Forms
|
64
67
|
*/
|
65
|
-
export declare const ControlRadio: ({ name, label, values, control, required, defaultValue, disabled, hideErrorMessage, labelKey, valueKey, validate, onChange: customOnChange, }: ControlRadioProps) => JSX.Element;
|
68
|
+
export declare const ControlRadio: ({ name, label, values, control, required, defaultValue, disabled, hideErrorMessage, labelKey, valueKey, validate, onChange: customOnChange, row, radioProps }: ControlRadioProps) => JSX.Element;
|
66
69
|
export default ControlRadio;
|