react-tooltip icon indicating copy to clipboard operation
react-tooltip copied to clipboard

Setting z-index with className

Open mdodge-ecgrow opened this issue 3 years ago • 1 comments

Not sure why, but I cannot figure out how to set the z-index with the className. I tried it with a number an a string and neither did anything. I am using it in a modal and following the troubleshooting steps on the mian page. If your modal's z-index happens to be higher than the tooltip's, use the attribute className to custom your tooltip's z-index

This is my code:

<ReactTooltip
	id={'view-hash'}
	effect={'solid'}
	place={'top'}
	backgroundColor={'#212529'}
	delayHide={2000}
	clickable={true}
	className={'2000'}
/>

mdodge-ecgrow avatar Jan 18 '22 05:01 mdodge-ecgrow

Not sure why, but I cannot figure out how to set the z-index with the className. I tried it with a number an a string and neither did anything. I am using it in a modal and following the troubleshooting steps on the mian page. If your modal's z-index happens to be higher than the tooltip's, use the attribute className to custom your tooltip's z-index

This is my code:

<ReactTooltip
	id={'view-hash'}
	effect={'solid'}
	place={'top'}
	backgroundColor={'#212529'}
	delayHide={2000}
	clickable={true}
	className={'2000'}
/>

add a class in your css called abc and use abc as your className. Then inside abc, do z-index: 9999 !important;.

rickyzhangca avatar Mar 08 '22 18:03 rickyzhangca