RadioButton

Como utilizar

import { RadioButton } from '@superlogica/design-system-mobile'
import React, { useState } from 'react';
import { View } from 'react-native';
import { RadioButton } from '@superlogica/design-system-mobile';
const YourApp = () => {
const [radioButtonOne, setRadioButtonOne] = useState(false)
const [radioButtonTwo, setRadioButtonTwo] = useState(false)
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<RadioButton
label="RadioButton1"
checked={radioButtonOne}
onChange={() => setRadioButtonOne(!radioButtonOne)}
/>
<RadioButton
label="RadioButton2"
checked={radioButtonTwo}
onChange={() => setRadioButtonTwo(!radioButtonTwo)}
size="lg"
/>
</View>
)
}
export default YourApp;

Props

PropTipoDefaultDescrição
checkedboolfalsetrue ou false para alterar o estado do componente
onChangefunc() => {}Função chamada quando houver mudança no value no componente
labelstring" "Label do componente
sizestringmdDefine o tamanho do componente (md ou lg)
disabledboolfalseDesabilita o componente