import React from 'react';
import Taro from '@tarojs/taro';
import { View } from '@tarojs/components';
import { Popup, Picker } from '@antmjs/vantui';

const columns = ['18-35岁', '36-55岁', '56—65岁'];
export default (props) => {

  const { show, onShowChange, value, onChange } = props;

  const onConfirm = (e) => {
    const val = e.detail.value;
    onChange(val);
    onShowChange(false);
  }
  
  return (
    <Popup position="bottom" show={show} onClose={() => onShowChange(false)}>
      <Picker columns={columns} onConfirm={onConfirm} />
    </Popup>
  )
}
