UNPKG

tp-react-web-masked-text

Version:

Text and TextInput with mask for React Web applications

21 lines (16 loc) 374 B
import React, { Component } from 'react'; import BaseTextComponent from './base-text-component'; const TEXT_REF = '$text'; export default class TextMask extends BaseTextComponent { constructor(props) { super(props); } getElement() { return this.refs[TEXT_REF]; } render() { return ( <span ref={TEXT_REF} {...this.props}>{this.props.value}</span> ); } }