react-native-radio-buttons-group
Advanced tools
Comparing version 2.2.11 to 2.2.12
@@ -0,0 +0,0 @@ export * from './types'; |
@@ -16,2 +16,3 @@ export type RadioButtonProps = { | ||
value?: string; | ||
borderSize?: number; | ||
}; | ||
@@ -18,0 +19,0 @@ |
{ | ||
"name": "react-native-radio-buttons-group", | ||
"version": "2.2.11", | ||
"version": "2.2.12", | ||
"description": "Simple and Best. An easy to use radio buttons for react native apps.", | ||
@@ -35,3 +35,6 @@ "main": "./lib/index.ts", | ||
"lodash.isequal": "4.5.0" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash-isequal": "4.5.6" | ||
} | ||
} |
@@ -34,15 +34,16 @@ # React Native Radio Buttons Group | ||
const radioButtonsData = [{ | ||
id: '1', // acts as primary key, should be unique and non-empty string | ||
label: 'Option 1', | ||
value: 'option1' | ||
}, { | ||
id: '2', | ||
label: 'Option 2', | ||
value: 'option2' | ||
}] | ||
export default function App() { | ||
const [radioButtons, setRadioButtons] = useState(radioButtonsData) | ||
const [radioButtons, setRadioButtons] = useState([ | ||
{ | ||
id: '1', // acts as primary key, should be unique and non-empty string | ||
label: 'Option 1', | ||
value: 'option1' | ||
}, | ||
{ | ||
id: '2', | ||
label: 'Option 2', | ||
value: 'option2' | ||
} | ||
]); | ||
@@ -71,15 +72,16 @@ function onPressRadioButton(radioButtonsArray) { | ||
const radioButtonsData: RadioButtonProps[] = [{ | ||
id: '1', // acts as primary key, should be unique and non-empty string | ||
label: 'Option 1', | ||
value: 'option1' | ||
}, { | ||
id: '2', | ||
label: 'Option 2', | ||
value: 'option2' | ||
}] | ||
export default function App() { | ||
const [radioButtons, setRadioButtons] = useState<RadioButtonProps[]>(radioButtonsData) | ||
const [radioButtons, setRadioButtons] = useState<RadioButtonProps[]>([ | ||
{ | ||
id: '1', // acts as primary key, should be unique and non-empty string | ||
label: 'Option 1', | ||
value: 'option1' | ||
}, | ||
{ | ||
id: '2', | ||
label: 'Option 2', | ||
value: 'option2' | ||
} | ||
]); | ||
@@ -107,2 +109,3 @@ function onPressRadioButton(radioButtonsArray: RadioButtonProps[]) { | ||
borderColor | string | no | color | css color formats | ||
borderSize | number | 2 | | positive numbers | ||
color | string | no | #444 | css color formats | ||
@@ -109,0 +112,0 @@ containerStyle | object | no | | react style |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
110316
9
155
154
1