function HighlightedText(props) {
    const { style, className, parts, hitComponent, textComponent, isInline } = props;
    const finalHitContainer = hitComponent || DefaultHitContainer;
    const finalTextContainer = textComponent || DefaultTextContainer;

    return (
        <HighlighContainer className={className} style={style} isInline={isInline}>
            <HitText
                parts={parts}
                hitComponent={finalHitContainer}
                textComponent={finalTextContainer}
            />
        </HighlighContainer>
    );
}
HighlightedText is a component that highlights a part of a text.