Skip to content

Commit

Permalink
feat: fixed proptypes and description
Browse files Browse the repository at this point in the history
  • Loading branch information
amontalvof committed Oct 5, 2020
1 parent 1eb1d94 commit 8757dff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/HighlightedText/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface HighlightedText extends BaseProps {
hitComponent?: ComponentType<{ children?: string }>;
textComponent?: ComponentType<{ children?: string }>;
parts?: Part[];
isInline: boolean;
isInline?: boolean;
}

export default function(props: HighlightedText): JSX.Element | null;
6 changes: 3 additions & 3 deletions src/components/HighlightedText/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import PropTypes, { bool } from 'prop-types';
import PropTypes from 'prop-types';
import HitText from './hitText';
import HighlighContainer from './highlighContainer';
import { DefaultHitContainer, DefaultTextContainer } from './styled/index';
Expand Down Expand Up @@ -46,8 +46,8 @@ HighlightedText.propTypes = {
* the text not highlighted
*/
textComponent: PropTypes.elementType,
/** A boolean that when it is true wraps the text in a span tag, and when it is false wraps it in a p tag, this lets you display the text block or inline */
isInline: bool,
/** A boolean that when it is true display the text inline, and when it is false display the text block. */
isInline: PropTypes.bool,
};

HighlightedText.defaultProps = {
Expand Down

0 comments on commit 8757dff

Please sign in to comment.