Skip to content

Commit

Permalink
propTypes readded
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigrsig authored and atilafassina committed Jul 8, 2022
1 parent 4f8b3b2 commit 25bf098
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Suggestion.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import PropTypes from 'prop-types'
import { defaultStyle } from './utils'
import { getSubstringIndex } from './utils'

Expand Down Expand Up @@ -72,6 +73,24 @@ function Suggestion({
)
}

Suggestion.propTypes = {
id: PropTypes.string.isRequired,
query: PropTypes.string.isRequired,
index: PropTypes.number.isRequired,
ignoreAccents: PropTypes.bool,

suggestion: PropTypes.oneOfType([
PropTypes.string,
PropTypes.shape({
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
display: PropTypes.string,
}),
]).isRequired,
renderSuggestion: PropTypes.func,

focused: PropTypes.bool,
}

const styled = defaultStyle(
{
cursor: 'pointer',
Expand Down

1 comment on commit 25bf098

@vercel
Copy link

@vercel vercel bot commented on 25bf098 Jul 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-mentions – ./

react-mentions-git-master-signavio.vercel.app
react-mentions.vercel.app
react-mentions-signavio.vercel.app

Please sign in to comment.