문제

Trying to show HTML data to teaching bubble headline but getting below error.

Any idea how can I resolve it?

enter image description here

도움이 되었습니까?

해결책

The headline attribute in TeachingBubble component needs a string value. enter image description here

As a workaround,we could add html element in the content part. enter image description here

Test code:

{teachingBubbleVisible && (
        <TeachingBubble
          target="#targetButton"
          primaryButtonProps={examplePrimaryButtonProps}
          secondaryButtonProps={exampleSecondaryButtonProps}
          onDismiss={toggleTeachingBubbleVisible}
          
        >
            <h1>Discover what’s trending around youw</h1>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere, nulla, ipsum? Molestiae quis aliquam magni
          harum non?
        </TeachingBubble>
      )}

다른 팁

As per the documentation at ITeachingBubbleProps interface - headline,

headline property expects string value. So you have to pass the string value to headline property of TeachingBubble element.

If want to apply additional styling to headline then you can use:

ITeachingBubbleStyles interface - headline

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top