/react-native-swag-toggle

A Swag Toggle for React Native and Expo Web

Primary LanguageTypeScriptMIT LicenseMIT

react-native-swag-toggle

A Swag Toggle for React Native and Expo Web

Screnshot

Installation

yarn add react-native-swag-toggle

Usage

import SwagToggle from 'react-native-swag-toggle';

const Component = () => {
  const [value, setValue] = React.useState(false);
  return (
    <SwagToggle
      value={value}
      onValueChange={setValue}
      leftText="L"
      rightText="R"
      style={styles.toggle}
      handleStyle={styles.handle}
      activeTextStyle={styles.activeText}
      inactiveTextStyle={styles.inactiveText}
    />
  );
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT