@thecb/components 9.2.4-beta.2 → 9.2.4-beta.3
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/dist/index.cjs.js +7 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +4 -2
- package/src/components/molecules/radio-section/RadioSection.stories.js +1 -0
package/package.json
CHANGED
|
@@ -47,7 +47,8 @@ const RadioSection = ({
|
|
|
47
47
|
initiallyOpen = true,
|
|
48
48
|
openHeight = "auto",
|
|
49
49
|
containerStyles = "",
|
|
50
|
-
ariaDescribedBy
|
|
50
|
+
ariaDescribedBy,
|
|
51
|
+
isRequired = false
|
|
51
52
|
}) => {
|
|
52
53
|
const handleKeyDown = (id, e) => {
|
|
53
54
|
if (e?.keyCode === 13 || e?.keyCode === 32) {
|
|
@@ -105,7 +106,7 @@ const RadioSection = ({
|
|
|
105
106
|
borderRadius="4px"
|
|
106
107
|
extraStyles={containerStyles}
|
|
107
108
|
>
|
|
108
|
-
<Stack childGap="0" role="radiogroup">
|
|
109
|
+
<Stack childGap="0" role="radiogroup" required={isRequired}>
|
|
109
110
|
{sections
|
|
110
111
|
.filter(section => !section.hidden)
|
|
111
112
|
.map(section => (
|
|
@@ -124,6 +125,7 @@ const RadioSection = ({
|
|
|
124
125
|
role="radio"
|
|
125
126
|
aria-checked={openSection === section.id}
|
|
126
127
|
aria-disabled={section.disabled}
|
|
128
|
+
required={section?.required}
|
|
127
129
|
>
|
|
128
130
|
<Stack childGap="0">
|
|
129
131
|
<Box
|