0.1.0 • Published 4 years ago

react-email-misspelled v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

npm CircleCI Status codecov npm npm npm

This is a react wrapper for email-misspelled package
Check the misspelled email's domain and return a list (or first) of matching domain suggestions sorted by corrections needed

The string comparison is based on this algorithm

example

Table of Contents

  1. Install
  2. \
  3. \
  4. \
  5. Typescript support

Install with npm:

    npm i react-email-misspelled --save

Install with yarn:

    yarn add react-email-misspelled

This component contains a div with a text input and the suggestions list

Usage

To use this components you just need to import the component and the domains list you want to check

import { EmailMisspelledWithInput, top100 } from "react-email-misspelled"

export default FancyComponent () => {
    return <EmailMisspelledWithInput domains={top100} />
}

label

TypeRequiredDescription
stringfalseString display in the label element
import { EmailMisspelledWithInput, top100 } from "react-email-misspelled"

export default FancyComponent () => {  
    return <EmailMisspelledWithInput  
        domains={top100}  
        label="Your email address"  
    />  
}  

This will just return a div with the more accurate result

Usage

To use this components you just need to import the component and the domains list you want to check

import { EmailMisspelledSuggestFirst, top100 } from "react-email-misspelled"

export default FancyComponent () => {
    return <EmailMisspelledSuggestFirst domains={top100} />
}

label

TypeRequiredDescription
stringfalseAdd your classname
import { EmailMisspelledWithInput, top100 } from "react-email-misspelled"

export default FancyComponent () => {  
    return <EmailMisspelledSuggestFirst  
        domains={top100}  
        className="foo bar"  
    />  
}  

This will just return a div with the more accurate result

Usage

To use this components you just need to import the component and the domains list you want to check

import { EmailMisspelledSuggestList, top100 } from "react-email-misspelled"

export default FancyComponent () => {
    return <EmailMisspelledSuggestList domains={top100} />
}

label

TypeRequiredDescription
stringfalseAdd your classname
import { EmailMisspelledSuggestList, top100 } from "react-email-misspelled"

export default FancyComponent () => {  
    return <EmailMisspelledSuggestList  
        domains={top100}  
        className="foo bar"  
    />  
}  

description...

TypeName

    import { TypeName } from "react-email-misspelled/typings"

    //type

TODO

  • Doc
  • TU
  • TS