Skip to content

Commit 124f38c

Browse files
authored
fix: custom theme property for RadioButtonItem component (#4036)
1 parent be2a278 commit 124f38c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/components/RadioButton/RadioButtonItem.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from 'react-native';
1010

1111
import { useInternalTheme } from '../../core/theming';
12-
import type { InternalTheme, MD3TypescaleKey } from '../../types';
12+
import type { ThemeProp, MD3TypescaleKey } from '../../types';
1313
import TouchableRipple from '../TouchableRipple/TouchableRipple';
1414
import Text from '../Typography/Text';
1515
import RadioButton from './RadioButton';
@@ -79,7 +79,7 @@ export type Props = {
7979
/**
8080
* @optional
8181
*/
82-
theme?: InternalTheme;
82+
theme?: ThemeProp;
8383
/**
8484
* testID to be used on tests.
8585
*/
@@ -135,7 +135,14 @@ const RadioButtonItem = ({
135135
labelVariant = 'bodyLarge',
136136
}: Props) => {
137137
const theme = useInternalTheme(themeOverrides);
138-
const radioButtonProps = { value, disabled, status, color, uncheckedColor };
138+
const radioButtonProps = {
139+
value,
140+
disabled,
141+
status,
142+
color,
143+
theme,
144+
uncheckedColor,
145+
};
139146
const isLeading = position === 'leading';
140147
let radioButton: any;
141148

0 commit comments

Comments
 (0)