Skip to content

Commit

Permalink
feat: add color and uncheckedColor prop to RadioButton.Item (callstac…
Browse files Browse the repository at this point in the history
  • Loading branch information
remagpie authored and Mariia Marchenkova committed Jun 2, 2020
1 parent 58c756f commit c2d738c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/components/RadioButton/RadioButtonItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ export type Props = {
* Function to execute on press.
*/
onPress?: () => void;
/**
* Custom color for unchecked radio.
*/
uncheckedColor?: string;
/**
* Custom color for radio.
*/
color?: string;
/**
* Status of radio button.
*/
Expand Down Expand Up @@ -90,6 +98,8 @@ class RadioButtonItem extends React.Component<Props> {
style,
labelStyle,
onPress,
color,
uncheckedColor,
status,
theme: { colors },
} = this.props;
Expand All @@ -113,7 +123,12 @@ class RadioButtonItem extends React.Component<Props> {
>
{label}
</Text>
<RadioButton value={value} status={status}></RadioButton>
<RadioButton
value={value}
status={status}
color={color}
uncheckedColor={uncheckedColor}
/>
</View>
</TouchableRipple>
);
Expand Down

0 comments on commit c2d738c

Please sign in to comment.