How to use the native-base.Picker.Item function in native-base

To help you get started, we’ve selected a few native-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github transistorsoft / rn-background-geolocation-demo / src / advanced / SettingsView.tsx View on Github external
Platform,
} from 'react-native';

import {
  Container,
  Button, Icon,
  Text,
  Header, Title,
  Content,
  Left, Body, Right,
  Form, Label, Input, Picker, Switch,
  Item as FormItem,
  Spinner
} from 'native-base';

const Item = Picker.Item;

////
// Import BackgroundGeolocation plugin
// Note: normally you will not specify a relative url ../ here.  I do this in the sample app
// because the plugin can be installed from 2 sources:
//
// 1.  npm:  react-native-background-geolocation
// 2.  private github repo (customers only):  react-native-background-geolocation-android
//
// This simply allows one to change the import in a single file.
import BackgroundGeolocation, {
  State,
  DeviceSettingsRequest
} from "../react-native-background-geolocation";

import SettingsService from './lib/SettingsService';
github Tkd-Alex / Garcon-Restaurant-Manager / garcon-react-native / src / components / Registration / RegistrationForm.js View on Github external
import React, { Component } from 'react';
import { StyleSheet, View, KeyboardAvoidingView } from 'react-native';
import { Container, Content, List, ListItem, InputGroup, Input, Icon, Text, Picker, Button, Form } from 'native-base';

const Item = Picker.Item;

export default class RegistrationForm extends Component {

  constructor(props) {
      super(props);
      this.state = {
          selectedItem: undefined,
          selected1: 'key0',
          results: {
              items: [],
          },
      };
  }
  onValueChange(value: string) {
      this.setState({
          selected1: value,
github GeekyAnts / NativeBase-KitchenSink / js / components / picker / headerStylePicker.js View on Github external
Button,
  Icon,
  Text,
  Right,
  Body,
  Left,
  Picker,
  Form,
  View,
  H3,
  Item as FormItem
} from "native-base";

import styles from "./styles";

const Item = Picker.Item;

class RegularPicker extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selected5: "key2"
    };
  }

  onValueChange5(value: string) {
    this.setState({
      selected5: value
    });
  }
  render() {
    return (
github GeekyAnts / NativeBase-KitchenSink / src / screens / picker / headerStylePicker.js View on Github external
import {
  Container,
  Header,
  Title,
  Content,
  Button,
  Icon,
  Right,
  Body,
  Left,
  Picker,
  Form
} from "native-base";
import styles from "./styles";

const Item = Picker.Item;

class RegularPicker extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selected5: "key2"
    };
  }
  onValueChange5(value: string) {
    this.setState({
      selected5: value
    });
  }
  render() {
    return (
github GeekyAnts / NativeBase-KitchenSink / src / screens / list / list-icon.js View on Github external
Button,
  Icon,
  ListItem,
  Text,
  Badge,
  Left,
  Right,
  Body,
  Switch,
  Radio,
  Picker,
  Separator
} from "native-base";
import styles from "./styles";

const Item = Picker.Item;

class NHListIcon extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selectedItem: undefined,
      selected1: "key1",
      results: {
        items: []
      }
    };
  }
  onValueChange(value: string) {
    this.setState({
      selected1: value
    });
github GeekyAnts / NativeBase-KitchenSink / src / screens / picker / customHeaderPicker.js View on Github external
import {
  Container,
  Header,
  Title,
  Content,
  Button,
  Icon,
  Right,
  Body,
  Left,
  Picker,
  Form
} from "native-base";
import styles from "./styles";

const Item = Picker.Item;

class RegularPicker extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selected1: "key1"
    };
  }
  onValueChange(value: string) {
    this.setState({
      selected1: value
    });
  }
  render() {
    return (
github GeekyAnts / NativeBase-KitchenSink / src / screens / picker / picker-text-itemtext.js View on Github external
import {
  Container,
  Header,
  Title,
  Content,
  Button,
  Icon,
  Right,
  Body,
  Left,
  Picker,
  Form
} from "native-base";
import styles from "./styles";

const Item = Picker.Item;

class PickerTextItemText extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selected2: undefined
    };
  }
  onValueChange2(value: string) {
    this.setState({
      selected2: value
    });
  }
  render() {
    return (