Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

Styles from stylesheet is not applied

$
0
0

I'm trying to style a component but it doesn't look like the styles that I'm using is getting applied.

toolTipStyle gets prop-drilled down to the component but and I can see that they exist if I console.log them.

export const LinkCopiedToolTip = ({  disclaimerText,  isDesktop,  tooltipStyle,  setHasCopiedInvitationLink,}) => {  const [fadeOutTooltip, setFadeOutTooltip] = useState<boolean>(false).........  return (<View style={{ ...tooltipStyle.tooltipContainer, ...(fadeOutTooltip && tooltipStyle.fadeOut) }}><Tooltip hasFluidWidth arrow={isDesktop ? 'left' : 'top'}>        {disclaimerText}</Tooltip></View>  )}

The component LinkCopiedToolTip gets rendered depending on the state hasCopiedInvitationLink like this in a parent component:

{hasCopiedInvitationLink && (<LinkCopiedToolTip            disclaimerText={disclaimerText}            isDesktop={isDesktop}            tooltipStyle={{ ...tooltipContainer, ...fadeOut }}            setHasCopiedInvitationLink={setHasCopiedInvitationLink}          />        )}

Any takes :)? I'm at my wits end here. Thanks!

Tried a bunch of stuff. If I just hardcode the styles directly it works.


Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>