I wanted a component that does exactly this and figured I could also open source it to help others
npm install text-toggler
or
yarn add text-toggler
import { TextToggler } from 'text-toggler'
<TextToggler
options={['option 1', 'option 1',]}
onToggle={(value) => console.log(value)} />
containerStyle
textStyle