@aclymatepackages/modules 4.1.9 → 4.2.1
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.
|
@@ -20,7 +20,8 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
20
20
|
const YesNoQuestionButtons = _ref => {
|
|
21
21
|
let {
|
|
22
22
|
value,
|
|
23
|
-
setValue
|
|
23
|
+
setValue,
|
|
24
|
+
disabled
|
|
24
25
|
} = _ref;
|
|
25
26
|
const {
|
|
26
27
|
palette
|
|
@@ -45,7 +46,8 @@ const YesNoQuestionButtons = _ref => {
|
|
|
45
46
|
return /*#__PURE__*/_react.default.createElement(_atoms.ToggleButtons, {
|
|
46
47
|
value: value,
|
|
47
48
|
onChange: setValue,
|
|
48
|
-
buttons: buttons
|
|
49
|
+
buttons: buttons,
|
|
50
|
+
disabled: disabled
|
|
49
51
|
});
|
|
50
52
|
};
|
|
51
53
|
const YesNoQuestion = _ref2 => {
|
|
@@ -54,7 +56,8 @@ const YesNoQuestion = _ref2 => {
|
|
|
54
56
|
value,
|
|
55
57
|
setValue,
|
|
56
58
|
typographyProps,
|
|
57
|
-
lightBackground
|
|
59
|
+
lightBackground,
|
|
60
|
+
disabled
|
|
58
61
|
} = _ref2;
|
|
59
62
|
const findTheme = () => {
|
|
60
63
|
if (lightBackground || value !== undefined) {
|
|
@@ -79,7 +82,8 @@ const YesNoQuestion = _ref2 => {
|
|
|
79
82
|
theme: findTheme()
|
|
80
83
|
}, /*#__PURE__*/_react.default.createElement(YesNoQuestionButtons, {
|
|
81
84
|
value: value,
|
|
82
|
-
setValue: setValue
|
|
85
|
+
setValue: setValue,
|
|
86
|
+
disabled: disabled
|
|
83
87
|
}))));
|
|
84
88
|
};
|
|
85
89
|
var _default = exports.default = YesNoQuestion;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aclymatepackages/modules",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Aclymate modules",
|
|
5
5
|
"author": "William Loopesko",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@aclymatepackages/array-immutability-helpers": "^1.0.0",
|
|
9
|
-
"@aclymatepackages/atoms": "^3.
|
|
10
|
-
"@aclymatepackages/chart-helpers": "^2.0
|
|
9
|
+
"@aclymatepackages/atoms": "^3.6.1",
|
|
10
|
+
"@aclymatepackages/chart-helpers": "^2.1.0",
|
|
11
11
|
"@aclymatepackages/converters": "^1.0.0",
|
|
12
12
|
"@aclymatepackages/fetch-aclymate-api": "^1.0.0",
|
|
13
13
|
"@aclymatepackages/formatters": "^1.0.0",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@aclymatepackages/multi-part-form": "^2.0.1",
|
|
17
17
|
"@aclymatepackages/other-helpers": "^1.0.9",
|
|
18
18
|
"@aclymatepackages/reg-exp": "^1.0.0",
|
|
19
|
-
"@aclymatepackages/subcategories": "^4.
|
|
19
|
+
"@aclymatepackages/subcategories": "^4.2.2",
|
|
20
20
|
"@aclymatepackages/themes": "^4.1.0",
|
|
21
21
|
"@babel/preset-react": "^7.16.7",
|
|
22
22
|
"@emotion/react": "^11.11.1",
|
|
@@ -6,7 +6,7 @@ import { ThemeProvider } from "@mui/material/styles";
|
|
|
6
6
|
import { ToggleButtons } from "@aclymatepackages/atoms";
|
|
7
7
|
import { mergeDarkTheme, mainTheme } from "@aclymatepackages/themes";
|
|
8
8
|
|
|
9
|
-
const YesNoQuestionButtons = ({ value, setValue }) => {
|
|
9
|
+
const YesNoQuestionButtons = ({ value, setValue, disabled }) => {
|
|
10
10
|
const { palette } = useTheme();
|
|
11
11
|
|
|
12
12
|
const noButtonStyleObj =
|
|
@@ -21,7 +21,14 @@ const YesNoQuestionButtons = ({ value, setValue }) => {
|
|
|
21
21
|
{ value: true, name: "Yes", ...yesButtonStyleObj },
|
|
22
22
|
];
|
|
23
23
|
|
|
24
|
-
return
|
|
24
|
+
return (
|
|
25
|
+
<ToggleButtons
|
|
26
|
+
value={value}
|
|
27
|
+
onChange={setValue}
|
|
28
|
+
buttons={buttons}
|
|
29
|
+
disabled={disabled}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
25
32
|
};
|
|
26
33
|
|
|
27
34
|
const YesNoQuestion = ({
|
|
@@ -30,6 +37,7 @@ const YesNoQuestion = ({
|
|
|
30
37
|
setValue,
|
|
31
38
|
typographyProps,
|
|
32
39
|
lightBackground,
|
|
40
|
+
disabled,
|
|
33
41
|
}) => {
|
|
34
42
|
const findTheme = () => {
|
|
35
43
|
if (lightBackground || value !== undefined) {
|
|
@@ -58,7 +66,11 @@ const YesNoQuestion = ({
|
|
|
58
66
|
</Grid>
|
|
59
67
|
<Grid item>
|
|
60
68
|
<ThemeProvider theme={findTheme()}>
|
|
61
|
-
<YesNoQuestionButtons
|
|
69
|
+
<YesNoQuestionButtons
|
|
70
|
+
value={value}
|
|
71
|
+
setValue={setValue}
|
|
72
|
+
disabled={disabled}
|
|
73
|
+
/>
|
|
62
74
|
</ThemeProvider>
|
|
63
75
|
</Grid>
|
|
64
76
|
</Grid>
|