import Taro, { useState } from '@tarojs/taro';
import { maskPhone } from '@/utils/tools';

export default function PhoneMask(props) {
  const { phone, disable = false } = props
  const [mask, setMask] = useState(true);

  const toggle = () => setMask(!mask);
  const text = mask ? maskPhone(phone || '') : phone;

  return (
    <Text>{text}</Text>
  )
}

