dhre-ui-kit 0.0.322 → 0.0.324
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/lib/index.d.ts +1 -0
- package/lib/index.js +11 -2
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +11 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1164,6 +1164,7 @@ interface RadioButtonGroupProps {
|
|
|
1164
1164
|
containerStyle?: ViewStyle;
|
|
1165
1165
|
labelStyle?: ViewStyle;
|
|
1166
1166
|
optionContainerStyle?: ViewStyle;
|
|
1167
|
+
selectedValue?: string;
|
|
1167
1168
|
}
|
|
1168
1169
|
|
|
1169
1170
|
declare const RadioButtonGroup: React$1.FC<RadioButtonGroupProps>;
|
package/lib/index.js
CHANGED
|
@@ -5000,8 +5000,17 @@ const styles = reactNative.StyleSheet.create({
|
|
|
5000
5000
|
}
|
|
5001
5001
|
});
|
|
5002
5002
|
|
|
5003
|
-
const RadioButtonGroup = ({
|
|
5004
|
-
|
|
5003
|
+
const RadioButtonGroup = ({
|
|
5004
|
+
data,
|
|
5005
|
+
onSelect,
|
|
5006
|
+
containerStyle,
|
|
5007
|
+
labelStyle,
|
|
5008
|
+
optionContainerStyle,
|
|
5009
|
+
selectedValue
|
|
5010
|
+
}) => {
|
|
5011
|
+
const [selectedOption, setSelectedOption] = React.useState(
|
|
5012
|
+
selectedValue ?? data[0]?.value
|
|
5013
|
+
);
|
|
5005
5014
|
const handleSelect = (item) => {
|
|
5006
5015
|
setSelectedOption(item.value);
|
|
5007
5016
|
onSelect(item);
|