Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

material ui phone number input

import PhoneInput from 'react-phone-number-input'
import CustomPhoneNumber from '../components/prebuilt/PhoneNumber'
...
<PhoneInput
   placeholder='Enter phone number'
   value={phone}
   onChange={setPhone}
   inputComponent={CustomPhoneNumber}
/>
...
Comment

material ui phone number input

import { forwardRef } from 'react'
import TextField from '@material-ui/core/TextField'
import { makeStyles } from '@material-ui/core/styles'

const useStyles = makeStyles(theme => ({
  input: {
    backgroundColor: '#fff'
  }
}))

const phoneInput = (props, ref) => {
  const classes = useStyles()

  return (

    <TextField
      {...props}
      InputProps={{
        className: classes.input
      }}
      inputRef={ref}
      fullWidth
      size='small'
      label='Phone Number'
      variant='outlined'
      name='phone'
    />
  )
}
export default forwardRef(phoneInput)
Comment

PREVIOUS NEXT
Code Example
Javascript :: express example 
Javascript :: jsonl parser 
Javascript :: set.contains in javascript 
Javascript :: notify.js 
Javascript :: convert string to array with condition javascirpt 
Javascript :: mergesort 
Javascript :: check the type of a variable in js 
Javascript :: javascript date objects 
Javascript :: simple chat app 
Javascript :: sequelize change item 
Javascript :: Javascript get / print current path 
Javascript :: fetch composition API in Vue3 
Javascript :: mongoose create text index to search for text 
Javascript :: Sort by month name javascript 
Javascript :: modules.exports javascript 
Javascript :: how to assign dynamic value to variable in javascript 
Javascript :: for loop in javacript 
Javascript :: setup error handler in express framework 
Javascript :: mui animation 
Javascript :: base64 from file 
Javascript :: javascript static class variable 
Javascript :: How do I use for-loops js 
Javascript :: how to use axios filter 
Javascript :: quiz javascript 
Javascript :: jwt npm 
Javascript :: javascript classes 
Javascript :: add 2 class names react 
Javascript :: new useSelector 
Javascript :: pretty print javascript 
Javascript :: add value to object 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =